diff -Nru apt-clone-0.2.2ubuntu1/apt_clone.py apt-clone-0.2.2ubuntu2/apt_clone.py --- apt-clone-0.2.2ubuntu1/apt_clone.py 2012-07-25 16:45:13.000000000 +0000 +++ apt-clone-0.2.2ubuntu2/apt_clone.py 2012-08-09 20:09:45.000000000 +0000 @@ -218,16 +218,17 @@ def _add_file_to_tar_with_password_check(self, tar, sources, scrub=False): if scrub: - with tempfile.NamedTemporaryFile(mode='w') as source_copy, open(sources, 'r') as f: - for line in f.readlines(): - if re.search('/[^/@:]*:[^/@:]*@', line): - scrubbed_line = re.sub('/[^/@:]*:[^/@:]*@', - '/USERNAME:PASSWORD@', line) - source_copy.write(scrubbed_line) - else: - source_copy.write(line) - source_copy.flush() - tar.add(source_copy.name, arcname=".%s" % (sources)) + with tempfile.NamedTemporaryFile(mode='w') as source_copy: + with open(sources, 'r') as f: + for line in f.readlines(): + if re.search('/[^/@:]*:[^/@:]*@', line): + scrubbed_line = re.sub('/[^/@:]*:[^/@:]*@', + '/USERNAME:PASSWORD@', line) + source_copy.write(scrubbed_line) + else: + source_copy.write(line) + source_copy.flush() + tar.add(source_copy.name, arcname=".%s" % (sources)) else: tar.add(sources, arcname='.%s' % sources) diff -Nru apt-clone-0.2.2ubuntu1/debian/changelog apt-clone-0.2.2ubuntu2/debian/changelog --- apt-clone-0.2.2ubuntu1/debian/changelog 2012-07-25 17:46:39.000000000 +0000 +++ apt-clone-0.2.2ubuntu2/debian/changelog 2012-08-09 20:11:25.000000000 +0000 @@ -1,3 +1,9 @@ +apt-clone (0.2.2ubuntu2) precise-proposed; urgency=low + + * apt_clone.py: fix with syntax to work with python2.6 + + -- Brian Murray Thu, 09 Aug 2012 13:10:17 -0700 + apt-clone (0.2.2ubuntu1) precise-proposed; urgency=low * apt_clone.py: Binary files /tmp/XXhqWoIm9o/apt-clone-0.2.2ubuntu1/debian/.changelog.swp and /tmp/TyqrmQ0Gn0/apt-clone-0.2.2ubuntu2/debian/.changelog.swp differ