Pavel Zhukov has posted comments on this change.

Change subject: Fix pep8 warnings
......................................................................


Patch Set 6:

(1 comment)

https://gerrit.ovirt.org/#/c/52678/6/src/ovirtnode/ovirtfunctions.py
File src/ovirtnode/ovirtfunctions.py:

Line 276: # return 1 otherwise
Line 277: 
Line 278: 
Line 279: def is_upgrade():
Line 280:     return OVIRT_VARS.get("OVIRT_UPGRADE") == "1"
> what happens if there's no such key in OVIRT_VARS? You don't test using has
get doesn't raise Exception It returns None if not has_key. So it should work
Pep8 was complained about has_key as deprecated it can be replaced with "in" 
but get is exactly for this usecase
Line 281: 
Line 282: 
Line 283: def is_install():
Line 284:     return OVIRT_VARS.get("OVIRT_INSTALL") == "1"


-- 
To view, visit https://gerrit.ovirt.org/52678
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8c446035431ed8748e50a9f2d130d139ccac155c
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Pavel Zhukov <[email protected]>
Gerrit-Reviewer: Anton Marchukov <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Pavel Zhukov <[email protected]>
Gerrit-Reviewer: Yaniv Kaul <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to