1 |
commit: 98fbf73ba03a048fca37d409092a14472483b6c0 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 2 00:42:11 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 2 00:42:11 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=98fbf73b |
7 |
|
8 |
glsa.py: python3: ResourceWarning: unclosed file |
9 |
|
10 |
--- |
11 |
pym/portage/glsa.py | 3 ++- |
12 |
1 files changed, 2 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py |
15 |
index 1857695..f26dc8b 100644 |
16 |
--- a/pym/portage/glsa.py |
17 |
+++ b/pym/portage/glsa.py |
18 |
@@ -473,7 +473,8 @@ class Glsa: |
19 |
myurl = "file://"+self.nr |
20 |
else: |
21 |
myurl = repository + "glsa-%s.xml" % str(self.nr) |
22 |
- self.parse(urllib_request_urlopen(myurl)) |
23 |
+ with urllib_request_urlopen(myurl) as f: |
24 |
+ self.parse(f) |
25 |
return None |
26 |
|
27 |
def parse(self, myfile): |