[node-patches] Change in ovirt-node[master]: module: persist/unpersist module should raise

fabiand at redhat.com fabiand at redhat.com
Thu Jul 9 10:19:01 UTC 2015


Fabian Deutsch has posted comments on this change.

Change subject: module: persist/unpersist module should raise
......................................................................


Patch Set 5: Code-Review+2

(2 comments)

https://gerrit.ovirt.org/#/c/43044/5/scripts/persist
File scripts/persist:

Line 42:             continue
Line 43: 
Line 44:         try:
Line 45:             ret_persist = conf.persist(path)
Line 46:         except Exception:
If nothing than raise is done in the except part, then you can just remove the try - except block.
Line 47:             raise
Line 48: 
Line 49:         if ret_persist is None:
Line 50:             print "%s doesn't exist" % path


https://gerrit.ovirt.org/#/c/43044/5/scripts/unpersist
File scripts/unpersist:

Line 41:             continue
Line 42: 
Line 43:         try:
Line 44:             ret_unpersist = conf.unpersist(path)
Line 45:         except Exception:
As before: When you do only raise in the except part, then you can remove the complete try-except block
Line 46:             raise
Line 47: 
Line 48:         print "%s successully unpersisted" % path
Line 49: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1a917b2476957ef31e5ff452bfb01a4152b44f51
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes



More information about the node-patches mailing list