diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-09-01 17:42:11 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-09-01 17:42:11 -0700 |
commit | 98fbf73ba03a048fca37d409092a14472483b6c0 (patch) | |
tree | 2f67ad3342e0c8f553cab06b6672528834e0d41f | |
parent | ebuild-helpers/sed: move to bsd subdirectory (diff) | |
download | portage-98fbf73ba03a048fca37d409092a14472483b6c0.tar.gz portage-98fbf73ba03a048fca37d409092a14472483b6c0.tar.bz2 portage-98fbf73ba03a048fca37d409092a14472483b6c0.zip |
glsa.py: python3: ResourceWarning: unclosed file
-rw-r--r-- | pym/portage/glsa.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py index 185769574..f26dc8be2 100644 --- a/pym/portage/glsa.py +++ b/pym/portage/glsa.py @@ -473,7 +473,8 @@ class Glsa: myurl = "file://"+self.nr else: myurl = repository + "glsa-%s.xml" % str(self.nr) - self.parse(urllib_request_urlopen(myurl)) + with urllib_request_urlopen(myurl) as f: + self.parse(f) return None def parse(self, myfile): |