mirror of
https://github.com/gsi-upm/senpy
synced 2024-12-22 13:08:13 +00:00
More sensible exceptions when importing
This commit is contained in:
parent
74b0cf868e
commit
a1ffe04a30
@ -17,6 +17,7 @@ import inspect
|
||||
import sys
|
||||
import imp
|
||||
import logging
|
||||
import traceback
|
||||
import gevent
|
||||
import json
|
||||
|
||||
@ -190,7 +191,8 @@ class Senpy(object):
|
||||
except InvalidGitRepositoryError:
|
||||
module._repo = None
|
||||
except Exception as ex:
|
||||
logger.debug("Exception importing {}: {}".format(filename, ex))
|
||||
logger.error("Exception importing {}: {}".format(filename, ex))
|
||||
logger.error("Trace: {}".format(traceback.format_exc()))
|
||||
return None, None
|
||||
return name, module
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user