Yaniv Bronhaim has posted comments on this change.
Change subject: Adding supervdsm unit tests
......................................................................
Patch Set 10: (1 inline comment)
....................................................
File vdsm/supervdsmServer.py
Line 380: log.error("Could not start Super Vdsm", exc_info=True)
Line 381: sys.exit(1)
Line 382: finally:
Line 383: try:
Line 384: if address is not None and os.path.exists(address):
You wrote before that the proper way to avoid undefined variable is to put
"try" block right after we use the variable, so I split the try blocks and
treat them specifically.
If I wrap all application logic I need to add another try block inside the
finally as it was. do you prefer the that way?
That way, address can be undefined and the os.path.exists(address) will throw
exception and the except block will ignore it... is it better practice of
handling exception? I don't see what's wrong in the way I did it.
I would add another try block near the arg parse and that's all..
But as I understand from all your comments you prefer the way it was because
that split is redundant .. am I right?
Line 385: os.unlink(address)
Line 386: except OSError:
Line 387: pass
Line 388:
--
To view, visit http://gerrit.ovirt.org/8600
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I08880b12db8a6ca9cc57d74d2ef2a86980a5b097
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches