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 ?
« Back to merge proposal
Minor nit:
15 + with open(fname) as f: line.replace( 'archive. ubuntu. com', mirror))
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 ?