Merge with cca95b4ff0c5da10a3aebf355ac26e6541ded5b4 ZTK-1.1
authorThierry Florac <tflorac@ulthar.net>
Mon, 24 Sep 2012 08:54:09 +0200
branchZTK-1.1
changeset 174 380f23a1587e
parent 173 7164eb24f949 (current diff)
parent 172 cca95b4ff0c5 (diff)
child 175 590c2e6d725e
Merge with cca95b4ff0c5da10a3aebf355ac26e6541ded5b4
src/ztfy/utils/interfaces.py
src/ztfy/utils/zodb.py
--- a/src/ztfy/utils/interfaces.py	Mon Sep 24 08:49:04 2012 +0200
+++ b/src/ztfy/utils/interfaces.py	Mon Sep 24 08:54:09 2012 +0200
@@ -179,11 +179,11 @@
                             description=_("Realm name on ZEO server"),
                             required=False)
 
-    def getJSONSettings(self):
+    def getSettings(self):
         """Get ZEO connection setting as a JSON dict"""
 
-    def update(self, values):
-        """Update connection properties from given dict values"""
+    def update(self, settings):
+        """Update internal fields with given settings dict"""
 
     def getConnection(self, wait=False):
         """Open ZEO connection with given settings"""
--- a/src/ztfy/utils/zodb.py	Mon Sep 24 08:49:04 2012 +0200
+++ b/src/ztfy/utils/zodb.py	Mon Sep 24 08:54:09 2012 +0200
@@ -52,15 +52,15 @@
     password = FieldProperty(IZEOConnection['password'])
     server_realm = FieldProperty(IZEOConnection['server_realm'])
 
-    def getJSONSettings(self):
+    def getSettings(self):
         result = {}
         for name in getFieldNames(IZEOConnection):
             result[name] = getattr(self, name)
         return result
 
-    def update(self, values):
+    def update(self, settings):
         names = getFieldNames(IZEOConnection)
-        for k, v in values.items():
+        for k, v in settings.items():
             if k in names:
                 setattr(self, k, unicode(v) if isinstance(v, str) else v)