summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-28 17:18:06 +0000
committerGerrit Code Review <review@openstack.org>2013-02-28 17:18:06 +0000
commit61692ca71da6ab30d15447d86c8a3c7d43350d4c (patch)
treef4bc8925df7b040d0a66a14405ce2030e850c0c8 /tools
parent176789368269582455fb55facd7b1c0fdaea4e03 (diff)
parentcc9cfb42d214ddb787b9c182365a429a5a476190 (diff)
downloadnova-61692ca71da6ab30d15447d86c8a3c7d43350d4c.tar.gz
nova-61692ca71da6ab30d15447d86c8a3c7d43350d4c.tar.xz
nova-61692ca71da6ab30d15447d86c8a3c7d43350d4c.zip
Merge "Prevent hacking.py from crashing on unexpected import exception"
Diffstat (limited to 'tools')
-rwxr-xr-xtools/hacking.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/hacking.py b/tools/hacking.py
index dbb4fbe79..03e46d738 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -29,6 +29,7 @@ import re
import subprocess
import sys
import tokenize
+import traceback
import pep8
@@ -210,6 +211,11 @@ def nova_import_rules(logical_line):
_missingImport.add(missing)
return True
return False
+ except Exception, exc:
+ # NOTE(jogo) don't stack trace if unexpected import error,
+ # log and continue.
+ traceback.print_exc()
+ return False
return True
def is_module(mod):