projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
874e299
)
Move the open call out of the inner try block.
author
Zac Medico
<zmedico@gentoo.org>
Fri, 22 Sep 2006 22:31:33 +0000
(22:31 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 22 Sep 2006 22:31:33 +0000
(22:31 -0000)
svn path=/main/trunk/; revision=4506
pym/cache/flat_hash.py
patch
|
blob
|
history
diff --git
a/pym/cache/flat_hash.py
b/pym/cache/flat_hash.py
index 90c785f3451c23b16043afcd2566be4a38831e71..1c687ecf395a8a9f83251d988a74c7673745dc5f 100644
(file)
--- a/
pym/cache/flat_hash.py
+++ b/
pym/cache/flat_hash.py
@@
-23,15
+23,13
@@
class database(fs_template.FsBased):
def __getitem__(self, cpv):
fp = os.path.join(self.location, cpv)
try:
- myf =
None
+ myf =
open(fp, "r")
try:
- myf = open(fp,"r")
d = self._parse_data(myf, cpv)
d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime)
return d
finally:
- if myf:
- myf.close()
+ myf.close()
except (IOError, OSError), e:
if e.errno != errno.ENOENT:
raise cache_errors.CacheCorruption(cpv, e)