diff --git a/neutron/cmd/sanity_check.py b/neutron/cmd/sanity_check.py index 4b1be1bb70..e2d1e640dd 100644 --- a/neutron/cmd/sanity_check.py +++ b/neutron/cmd/sanity_check.py @@ -104,11 +104,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():