summaryrefslogtreecommitdiff
path: root/tests/test_aptsources.py
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2013-05-08 19:09:21 +0200
committerMichael Vogt <egon@debian-devbox>2013-05-08 19:09:21 +0200
commite2e4d3dd3dc2a41469f5d559cbdb5ca6c5057f01 (patch)
tree6c3655648f24418b207422ff3125632bebf53962 /tests/test_aptsources.py
parent7cf77010c108df676d3e277716f790b994bba28e (diff)
parentb805a16a7466a99bf0952b0ccc0dc7c5b3c6f797 (diff)
downloadpython-apt-e2e4d3dd3dc2a41469f5d559cbdb5ca6c5057f01.tar.gz
merged from experimental and uploaded to sid
Diffstat (limited to 'tests/test_aptsources.py')
-rw-r--r--tests/test_aptsources.py3
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")