Bala.FA has posted comments on this change.

Change subject: gluster: Handling Attribute error in Python 2.6
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File vdsm/gluster/cli.py
Line 84:     try:
Line 85:         tree = etree.fromstring('\n'.join(out))
Line 86:         rv = int(tree.find('opRet').text)
Line 87:         msg = tree.find('opErrstr').text
Line 88:     except:
Don't treat *any* exception as GlusterXmlErrorException.  You could do either 
python version based exception list or 

if hasattr(etree, 'ParseError'):
   XmlParseError = etree.ParseError
else:
   XmlParseError = SyntaxError

then,

except (XmlParseError, AttributeError, ValueError)
Line 89:         raise ge.GlusterXmlErrorException(err=out)
Line 90:     if rv == 0:
Line 91:         return tree
Line 92:     else:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I63c33b34ce11473636365ea094e267c5424c7255
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Aravinda VK <[email protected]>
Gerrit-Reviewer: Aravinda VK <[email protected]>
Gerrit-Reviewer: Bala.FA <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to