Merge "Prevent hacking.py from crashing on unexpected import exception"
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user