]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Pythonified sanity_check.all_tests_passed
authorAssaf Muller <amuller@redhat.com>
Tue, 1 Jul 2014 13:18:35 +0000 (16:18 +0300)
committerAssaf Muller <amuller@redhat.com>
Mon, 8 Sep 2014 16:19:17 +0000 (19:19 +0300)
Change-Id: I48986344b7af507e2526d4e8bd1b03277f974972

neutron/cmd/sanity_check.py

index 1cc7088dc0e8104332776bee0633ce197285145a..b615c59314abe723ffb07ee0105d864247b40e6b 100644 (file)
@@ -89,11 +89,7 @@ def enable_tests_from_config():
 
 
 def all_tests_passed():
-    res = True
-    for opt in OPTS:
-        if cfg.CONF.get(opt.name):
-            res &= opt.callback()
-    return res
+    return all(opt.callback() for opt in OPTS if cfg.CONF.get(opt.name))
 
 
 def main():