diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-12-11 15:32:02 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-12-11 15:32:02 +0100 |
| commit | 610c1592a0118483651e66d12eea51df0624ebc1 (patch) | |
| tree | f4ce184c0418eccd47bcde40df1063a4430c6f88 /tests/test_aptsources.py | |
| parent | 2ad969f628aee2948a12f8c3ba03572646ac4c5f (diff) | |
| parent | c7eb97c2fc8e2f4d3a7e41ac615382657eb95d49 (diff) | |
| download | python-apt-610c1592a0118483651e66d12eea51df0624ebc1.tar.gz | |
merged test-fixes from ubuntu (mostly for dep8)
Diffstat (limited to 'tests/test_aptsources.py')
| -rw-r--r-- | tests/test_aptsources.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index 41cfabb3..75dd91c1 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -164,7 +164,8 @@ class TestAptSources(unittest.TestCase): from subprocess import Popen, PIPE target = "./data/aptsources/sources.list.enable_comps" line = "deb http://archive.ubuntu.com/ubuntu lucid main\n" - open(target, "w").write(line) + with open(target, "w") as target_file: + target_file.write(line) apt_pkg.config.set("Dir::Etc::sourcelist", target) sources = aptsources.sourceslist.SourcesList(True, self.templates) distro = aptsources.distro.get_distro(id="Ubuntu") |
