summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-04-25 18:41:20 +0000
committerGerrit Code Review <review@openstack.org>2012-04-25 18:41:20 +0000
commitcebdcf15d722b839fa9ecc411f5b368d8e7ecb93 (patch)
treed7049b50754b3cb01d40ed98d9498a196190edfb
parentd5878e8946688aca135b159b5dc7880670185e9f (diff)
parent82e1019edb3e2aec7426e80fc29d9fd2e99415f9 (diff)
downloadnova-cebdcf15d722b839fa9ecc411f5b368d8e7ecb93.tar.gz
nova-cebdcf15d722b839fa9ecc411f5b368d8e7ecb93.tar.xz
nova-cebdcf15d722b839fa9ecc411f5b368d8e7ecb93.zip
Merge "Number of missing imports should always be shown"
-rwxr-xr-xtools/hacking.py7
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