On 03/27/2014 08:46 AM, Vincent Ladeuil wrote:
> Minor nit:
>
> 15 + with open(fname) as f:
> 16 + lines = f.readlines()
> 17 + with open(fname, 'w') as f:
> 18 + for line in lines:
> 19 + f.write(line.replace('archive.ubuntu.com', mirror))
>
> Why not reading the file all at once and replace there ?
>
> Any number to share about that improvement ?
No - I'm just not as good of a multitasker as you. I'll make the change,
provided ev agrees this MP is still worth doing.
On 03/27/2014 08:46 AM, Vincent Ladeuil wrote: line.replace( 'archive. ubuntu. com', mirror))
> Minor nit:
>
> 15 + with open(fname) as f:
> 16 + lines = f.readlines()
> 17 + with open(fname, 'w') as f:
> 18 + for line in lines:
> 19 + f.write(
>
> Why not reading the file all at once and replace there ?
>
> Any number to share about that improvement ?
No - I'm just not as good of a multitasker as you. I'll make the change,
provided ev agrees this MP is still worth doing.