Change in vdsm[master]: xmlrpc: Parsing error logging enhancement - vdsClient

danken at redhat.com danken at redhat.com
Sat Nov 2 15:12:35 UTC 2013


Dan Kenigsberg has posted comments on this change.

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


Patch Set 2: Code-Review-1

(5 comments)

....................................................
Commit Message
Line 5: CommitDate: 2013-10-31 09:51:44 +0100
Line 6: 
Line 7: xmlrpc: Parsing error logging enhancement - vdsClient
Line 8: 
Line 9: Logging enhancement which help to understand the issues with
English: which helps understand
Line 10: parsing xml response during connection to vdsm. Parsing
Line 11: issues can occur when bad characters are in xml etc.
Line 12: 
Line 13: This part of fix improves debug information by printing


Line 9: Logging enhancement which help to understand the issues with
Line 10: parsing xml response during connection to vdsm. Parsing
Line 11: issues can occur when bad characters are in xml etc.
Line 12: 
Line 13: This part of fix improves debug information by printing
Is there another part to the fix?
Line 14: parameters passed for function execution. During parsing
Line 15: it will be always raw response.
Line 16: 
Line 17: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982065


Line 11: issues can occur when bad characters are in xml etc.
Line 12: 
Line 13: This part of fix improves debug information by printing
Line 14: parameters passed for function execution. During parsing
Line 15: it will be always raw response.
English: I do not understand the last sentence.
Line 16: 
Line 17: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982065
Line 18: Change-Id: Ife29c4f7749b9cd8a4ad892f486d91509e505ae4


....................................................
File lib/vdsm/vdscli.py.in
Line 37: class TransportWrapper:
Line 38:     def __init__(self, transport):
Line 39:         self._transport = transport
Line 40: 
Line 41:     def __getattr__(self, name):
which method(s) is(are) expected to raise ExpatError? I'd rather be more specific and wrap only the thing we need.

I suppose Saggy would freak out, but if its a couple of functions, how about inheriting from TransportClass?
Line 42:         if hasattr(self._transport, name):
Line 43:             func = getattr(self._transport, name)
Line 44:             return lambda *args, **kwargs: self._wrap(name, func, args, kwargs)
Line 45:         raise AttributeError(name)


Line 50:                 result = func(*args, **kwargs)
Line 51:             else:
Line 52:                 result = func(self._transport, *args, **kwargs)
Line 53:         except ExpatError as e:
Line 54:             sys.stdout.write('Parsing error was thrown during parsing '
better use stderr for reporting errors.
Line 55:                              'response. Following arguments were passed:')
Line 56:             for name, value in kwargs.items():
Line 57:                 sys.stdout.write('{0} = {1}'.format(name, value))
Line 58:             raise e


-- 
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: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list