Change in vdsm[master]: Extend vdsm-tool commands - retrieving host uuid by utils.ge...

danken at redhat.com danken at redhat.com
Wed May 22 14:18:53 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Extend vdsm-tool commands - retrieving host uuid by utils.getHostUUID
......................................................................


Patch Set 9: (1 inline comment)

....................................................
File vdsm-tool/vdsm-tool
Line 139:         usage_and_exit(1)
Line 140: 
Line 141:     try:
Line 142:         return tool_command[cmd]["command"](*args[1:])
Line 143:     except:
Well, Alon, the thinking is mutual ;-)

A python script, particularly one that is aimed for sysadmins or rpm scripts, should not have a catch-all try-except block. If someone changes his python interpreter crashes to send exception to an external tool, say abrt, we should not interfere by swallowing the exception and spitting it to stderr.

And in any case, this change is unrelated to the core of this patch.
Line 144:         traceback.print_exc(file=sys.stderr)
Line 145:         return 1
Line 146: 
Line 147: if __name__ == "__main__":


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia8cab7f55697e07479a4f35c161bd836925374e8
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>


More information about the vdsm-patches mailing list