summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
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):