diff options
| author | Joe Gordon <jogo@cloudscaling.com> | 2012-04-24 11:42:32 -0700 |
|---|---|---|
| committer | Joe Gordon <jogo@cloudscaling.com> | 2012-04-24 13:00:13 -0700 |
| commit | 82e1019edb3e2aec7426e80fc29d9fd2e99415f9 (patch) | |
| tree | d3792bc6f273173288bf33d284a8343488b46672 /tools | |
| parent | d0392a27e7bb713c06d1f300d5eac9651b36981d (diff) | |
| download | nova-82e1019edb3e2aec7426e80fc29d9fd2e99415f9.tar.gz nova-82e1019edb3e2aec7426e80fc29d9fd2e99415f9.tar.xz nova-82e1019edb3e2aec7426e80fc29d9fd2e99415f9.zip | |
Number of missing imports should always be shown
In tools/hacking.py
Change-Id: I1219dcc140594be97fc680981a122157fed2e279
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/hacking.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/hacking.py b/tools/hacking.py index 849ac898e..6a9b1bdc8 100755 --- a/tools/hacking.py +++ b/tools/hacking.py @@ -170,7 +170,7 @@ def nova_import_module_only(logical_line): return importModuleCheck(mod, parent, added) else: name = logical_line.split()[1] - if (name not in _missingImport and name): + if name not in _missingImport: if VERBOSE_MISSING_IMPORT: print >> sys.stderr, ("ERROR: import '%s' failed: %s" % (name, exc)) @@ -385,8 +385,7 @@ if __name__ == "__main__": pep8.readlines = readlines try: pep8._main() - except SystemExit: + finally: if len(_missingImport) > 0: - print >> sys.stderr, ("%i Missing imports in this test environment" + print >> sys.stderr, ("%i imports missing in this test environment" % len(_missingImport)) - raise |
