From 3e061490016011bcd5e58d6478026e5937f49207 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 8 Apr 2006 08:16:31 +0000 Subject: Fix some minor issues with the anydbm cache module. Thanks to Halcyon for reporting. svn path=/main/trunk/; revision=3097 --- pym/cache/anydbm.py | 6 +++--- 1 file 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 -- cgit v1.2.3-1-g7c22