Dan Kenigsberg has posted comments on this change.

Change subject: xmlrpc: Parsing error logging enhancement - vdsClient
......................................................................


Patch Set 4:

(1 comment)

....................................................
File lib/vdsm/vdscli.py.in
Line 40: 
Line 41:     def __getattr__(self, name):
Line 42:         if hasattr(self._transport, name):
Line 43:             func = getattr(self._transport, name)
Line 44:             if name == 'parse_response':
And guess what: the language as a built-in mechanism to wrap a single method. 
It's called inheritance, and it's almost perfect for the job. (Why "almost"? 
since we need to define the class on function run time).

If you hate that sooo much, have __init__ set
  self.parse_response = self._wrapped_parse_response
Line 45:                 return lambda *args, **kwargs: self._wrap(name,
Line 46:                                                           func, args, 
kwargs)
Line 47:             else:
Line 48:                 return func


-- 
To view, visit http://gerrit.ovirt.org/20627
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ife29c4f7749b9cd8a4ad892f486d91509e505ae4
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to