Number of missing imports should always be shown
In tools/hacking.py Change-Id: I1219dcc140594be97fc680981a122157fed2e279
This commit is contained in:
parent
d0392a27e7
commit
82e1019edb
@ -170,7 +170,7 @@ def nova_import_module_only(logical_line):
|
|||||||
return importModuleCheck(mod, parent, added)
|
return importModuleCheck(mod, parent, added)
|
||||||
else:
|
else:
|
||||||
name = logical_line.split()[1]
|
name = logical_line.split()[1]
|
||||||
if (name not in _missingImport and name):
|
if name not in _missingImport:
|
||||||
if VERBOSE_MISSING_IMPORT:
|
if VERBOSE_MISSING_IMPORT:
|
||||||
print >> sys.stderr, ("ERROR: import '%s' failed: %s" %
|
print >> sys.stderr, ("ERROR: import '%s' failed: %s" %
|
||||||
(name, exc))
|
(name, exc))
|
||||||
@ -385,8 +385,7 @@ if __name__ == "__main__":
|
|||||||
pep8.readlines = readlines
|
pep8.readlines = readlines
|
||||||
try:
|
try:
|
||||||
pep8._main()
|
pep8._main()
|
||||||
except SystemExit:
|
finally:
|
||||||
if len(_missingImport) > 0:
|
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))
|
% len(_missingImport))
|
||||||
raise
|
|
||||||
|
Loading…
Reference in New Issue
Block a user