Univention Bugzilla – Attachment 5988 Details for
Bug 35239
UCR modules and handlers are double-registered and double-executed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix hashing to prevent double registration
35239_ucr-register-handler.diff (text/plain), 1.29 KB, created by
Philipp Hahn
on 2014-07-10 12:27:22 CEST
(
hide
)
Description:
Fix hashing to prevent double registration
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2014-07-10 12:27:22 CEST
Size:
1.29 KB
patch
obsolete
>diff --git a/branches/ucs-3.2/ucs-3.2-2/base/univention-config-registry/python/univention/config_registry/handler.py b/branches/ucs-3.2/ucs-3.2-2/base/univention-config-registry/python/univention/config_registry/handler.py >index da144fa..a4285ad 100644 >--- a/branches/ucs-3.2/ucs-3.2-2/base/univention-config-registry/python/univention/config_registry/handler.py >+++ b/branches/ucs-3.2/ucs-3.2-2/base/univention-config-registry/python/univention/config_registry/handler.py >@@ -444,6 +444,14 @@ class ConfigHandlerScript(ConfigHandler): > super(ConfigHandlerScript, self).__init__() > self.script = script > >+ def __hash__(self): >+ """Return unique hash.""" >+ return hash(self.script) >+ >+ def __cmp__(self, other): >+ """Compare this to other handler.""" >+ return cmp(self.script, other.script) >+ > def __call__(self, args): > """Call external programm after change.""" > _ucr, changed = args >@@ -459,6 +467,14 @@ class ConfigHandlerModule(ConfigHandler): > super(ConfigHandlerModule, self).__init__() > self.module = module > >+ def __hash__(self): >+ """Return unique hash.""" >+ return hash(self.module) >+ >+ def __cmp__(self, other): >+ """Compare this to other handler.""" >+ return cmp(self.module, other.module) >+ > def __call__(self, args): > """Call python module after change.""" > ucr, changed = args
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 35239
: 5988