Refactor code to remove alerts as per lgtm and #1176.
This commit is contained in:
parent
dcde526f6d
commit
74eebfed6d
54 changed files with 226 additions and 264 deletions
|
|
@ -182,7 +182,6 @@ def import_cmdset(path, cmdsetobj, emit_to_obj=None, no_logging=False):
|
|||
#instantiate the cmdset (and catch its errors)
|
||||
if callable(cmdsetclass):
|
||||
cmdsetclass = cmdsetclass(cmdsetobj)
|
||||
errstring = ""
|
||||
return cmdsetclass
|
||||
except ImportError as err:
|
||||
logger.log_trace()
|
||||
|
|
@ -213,6 +212,7 @@ def import_cmdset(path, cmdsetobj, emit_to_obj=None, no_logging=False):
|
|||
else:
|
||||
errstring = errstring.format(path=python_path, traceback=err, timestamp=logger.timeformat())
|
||||
break
|
||||
return None # an error
|
||||
|
||||
if errstring:
|
||||
# returning an empty error cmdset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue