diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-02-28 17:18:06 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-02-28 17:18:06 +0000 |
| commit | 61692ca71da6ab30d15447d86c8a3c7d43350d4c (patch) | |
| tree | f4bc8925df7b040d0a66a14405ce2030e850c0c8 /tools | |
| parent | 176789368269582455fb55facd7b1c0fdaea4e03 (diff) | |
| parent | cc9cfb42d214ddb787b9c182365a429a5a476190 (diff) | |
| download | nova-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-x | tools/hacking.py | 6 |
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): |
