projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c89363
)
glsa.py: python3: ResourceWarning: unclosed file
author
Zac Medico
<zmedico@gentoo.org>
Sun, 2 Sep 2012 00:42:11 +0000
(17:42 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Sun, 2 Sep 2012 00:42:11 +0000
(17:42 -0700)
pym/portage/glsa.py
patch
|
blob
|
history
diff --git
a/pym/portage/glsa.py
b/pym/portage/glsa.py
index 1857695746773bb308db1e6f743c074e2b8e16ba..f26dc8be28cdc7b7e9812bc31ae162128398482f 100644
(file)
--- 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):