summaryrefslogtreecommitdiffstats
path: root/tools/hacking.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-26 06:07:05 +0000
committerGerrit Code Review <review@openstack.org>2013-02-26 06:07:05 +0000
commit032ee136488bec92b414ea0196d79e45dfd585f9 (patch)
tree182b562aacf8971320ad5cfd1e35e8ed5b695f29 /tools/hacking.py
parentf52c1c55d550a0c6d201c2f86bebd12f2b948ee8 (diff)
parent99308d4dd3b16e00af4e610be4f07c7d99e49846 (diff)
downloadnova-032ee136488bec92b414ea0196d79e45dfd585f9.tar.gz
nova-032ee136488bec92b414ea0196d79e45dfd585f9.tar.xz
nova-032ee136488bec92b414ea0196d79e45dfd585f9.zip
Merge "Fix hacking.py to handle 'cannot import x'"
Diffstat (limited to 'tools/hacking.py')
-rwxr-xr-xtools/hacking.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/hacking.py b/tools/hacking.py
index 1279e87e9..5b301d540 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -201,7 +201,8 @@ def nova_import_rules(logical_line):
# NOTE(vish): the import error might be due
# to a missing dependency
missing = str(exc).split()[-1]
- if missing != mod.split('.')[-1]:
+ if (missing != mod.split('.')[-1] or
+ "cannot import" in str(exc)):
_missingImport.add(missing)
return True
return False