server/sources/__init__.py
changeset 8696 0bb18407c053
parent 8695 358d8bed9626
child 8892 80783605d270
--- a/server/sources/__init__.py	Thu Feb 14 15:38:25 2013 +0100
+++ b/server/sources/__init__.py	Thu Feb 14 16:01:24 2013 +0100
@@ -187,7 +187,7 @@
         except KeyError:
             pass
         # check for unknown options
-        if confdict and not confdict.keys() == ['adapter']:
+        if confdict and tuple(confdict) != ('adapter',):
             if fail_if_unknown:
                 msg = _('unknown options %s') % ', '.join(confdict)
                 raise ValidationError(eid, {role_name('config', 'subject'): msg})
@@ -242,7 +242,7 @@
         """remove sensitive information such as login / password from source
         definition
         """
-        for key in sourcedef.keys():
+        for key in list(sourcedef):
             if not key in self.PUBLIC_KEYS:
                 sourcedef.pop(key)