Alon Bar-Lev has posted comments on this change. Change subject: Extend vdsm-tool commands - retrieving host uuid by utils.getHostUUID ......................................................................
Patch Set 5: (2 inline comments) .................................................... File lib/vdsm/tool/vdsm-id.py Line 32: if hostUUID is None: Line 33: raise RuntimeError('Cannot retrieve host UUID') Line 34: print hostUUID Line 35: except RuntimeError as e: Line 36: print e You should print exception to log anyway. I am not sure that printing to display is required. But... if you do print to display, please use stderr for errors. Thanks! .................................................... File lib/vdsm/utils.py Line 836: Line 837: Line 838: @memoized Line 839: def getHostUUID(legacy=True): Line 840: __hostUUID = None While at it, why keep the ugly name of __hostUUID? :) Line 841: try: Line 842: if os.path.exists(constants.P_VDSM_NODE_ID): Line 843: with open(constants.P_VDSM_NODE_ID) as f: Line 844: __hostUUID = f.readline().replace("\n", "") -- 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: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches