# HG changeset patch # User Thierry Florac # Date 1348469649 -7200 # Node ID 380f23a1587eb7caefedca76b49ff0e80c913a9a # Parent 7164eb24f9493c3d865de65431243a13629f4401# Parent cca95b4ff0c5da10a3aebf355ac26e6541ded5b4 Merge with cca95b4ff0c5da10a3aebf355ac26e6541ded5b4 diff -r 7164eb24f949 -r 380f23a1587e src/ztfy/utils/interfaces.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""" diff -r 7164eb24f949 -r 380f23a1587e src/ztfy/utils/zodb.py --- 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)