diff options
| author | Michael Vogt <egon@debian-devbox> | 2013-05-08 19:09:21 +0200 |
|---|---|---|
| committer | Michael Vogt <egon@debian-devbox> | 2013-05-08 19:09:21 +0200 |
| commit | e2e4d3dd3dc2a41469f5d559cbdb5ca6c5057f01 (patch) | |
| tree | 6c3655648f24418b207422ff3125632bebf53962 /tests/test_aptsources.py | |
| parent | 7cf77010c108df676d3e277716f790b994bba28e (diff) | |
| parent | b805a16a7466a99bf0952b0ccc0dc7c5b3c6f797 (diff) | |
| download | python-apt-e2e4d3dd3dc2a41469f5d559cbdb5ca6c5057f01.tar.gz | |
merged from experimental and uploaded to sid
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") |
