Antoni Segura Puimedon has posted comments on this change.

Change subject: Functional Tests [2/3]: Added ipwrapper.ruleExists+routeExists
......................................................................


Patch Set 2:

(3 comments)

....................................................
File lib/vdsm/ipwrapper.py
Line 254: 
Line 255: def _validate(validator, entry):
Line 256:     try:
Line 257:         validator.fromText(entry)
Line 258:     except:
What kind of exception are you likely or do you expect to get? This would catch 
even base exceptions.
Line 259:         return False
Line 260:     else:
Line 261:         return True
Line 262: 


Line 261:         return True
Line 262: 
Line 263: 
Line 264: def routeExists(route):
Line 265:     return route in [Route.fromText(entry) for entry in 
routeShowTable('all')
I'd prefer this to be a generator than a list comprehension.
Line 266:                      if _validate(Route, entry)]
Line 267: 
Line 268: 
Line 269: def ruleList():


Line 283:     _execCmd(command)
Line 284: 
Line 285: 
Line 286: def ruleExists(rule):
Line 287:     return rule in [Rule.fromText(entry) for entry in ruleList()
I'd prefer this to be a generator than a list comprehension.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaf7c28e85f53f51879750308f3a9f93fc635cf33
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to