summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-08 08:16:31 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-08 08:16:31 +0000
commit3e061490016011bcd5e58d6478026e5937f49207 (patch)
tree2604a0eb9485c25ab8b9f0d266233e43c24b07c4
parentadbfcda9c081aed3424169423b1c5cc0a7dee435 (diff)
downloadportage-3e061490016011bcd5e58d6478026e5937f49207.tar.gz
portage-3e061490016011bcd5e58d6478026e5937f49207.tar.bz2
portage-3e061490016011bcd5e58d6478026e5937f49207.zip
Fix some minor issues with the anydbm cache module. Thanks to Halcyon for reporting.
svn path=/main/trunk/; revision=3097
-rw-r--r--pym/cache/anydbm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/cache/anydbm.py b/pym/cache/anydbm.py
index 0a0cafe72..09a1cf8b1 100644
--- a/pym/cache/anydbm.py
+++ b/pym/cache/anydbm.py
@@ -36,7 +36,6 @@ class database(fs_template.FsBased):
try:
self._ensure_dirs()
self._ensure_dirs(self._db_path)
- self._ensure_access(self._db_path)
except (OSError, IOError), e:
raise cache_errors.InitializationError(self.__class__, e)
@@ -44,8 +43,9 @@ class database(fs_template.FsBased):
try:
if self.__db == None:
self.__db = anydbm_module.open(self._db_path, "c", self._perms)
- except andbm_module.error, e:
+ except anydbm_module.error, e:
raise cache_errors.InitializationError(self.__class__, e)
+ self._ensure_access(self._db_path)
def iteritems(self):
return self.__db.iteritems()
@@ -61,7 +61,7 @@ class database(fs_template.FsBased):
del self.__db[cpv]
def iterkeys(self):
- return iter(self.__db)
+ return iter(self.__db.keys())
def has_key(self, cpv):
return cpv in self.__db