summaryrefslogtreecommitdiff
path: root/portato/db/hash.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-04-11 01:39:31 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-04-11 01:39:31 +0200
commitd9a7cd1da64da57bea05e5b234b9d9c6fea7f911 (patch)
tree65955560af923d5fc5a6517f8362903f840d13ee /portato/db/hash.py
parent3c52ca58438e77d791a5cd5a2e3e0427445e93c2 (diff)
downloadportato-d9a7cd1da64da57bea05e5b234b9d9c6fea7f911.tar.gz
portato-d9a7cd1da64da57bea05e5b234b9d9c6fea7f911.tar.bz2
portato-d9a7cd1da64da57bea05e5b234b9d9c6fea7f911.zip
applied 2to3 and fixed the result
Diffstat (limited to 'portato/db/hash.py')
-rw-r--r--portato/db/hash.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/portato/db/hash.py b/portato/db/hash.py
index 4a6958b..f52f4dd 100644
--- a/portato/db/hash.py
+++ b/portato/db/hash.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import, with_statement
+
import re
from collections import defaultdict
@@ -102,7 +102,7 @@ class HashDatabase (Database):
if installed:
cats = self.inst_cats
else:
- cats = self._db.iterkeys()
+ cats = iter(self._db.keys())
else:
if installed:
@@ -124,7 +124,7 @@ class HashDatabase (Database):
except KeyError: # not in inst_cats - can be ignored
pass
- self._db[self.ALL] = filter(lambda x: x.cat != cat, self._db[self.ALL])
+ self._db[self.ALL] = [x for x in self._db[self.ALL] if x.cat != cat]
self.populate(cat+"/*")
else:
self.__initialize()
@@ -148,7 +148,7 @@ class HashDatabase (Database):
else:
try:
regex = re.compile(restrict, re.I)
- except re.error, e:
+ except re.error as e:
info(_("Error while compiling search expression: '%s'."), str(e))
else: # only set self._restrict if no error occurred
self._restrict = regex