mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
evals error out on gh action
This commit is contained in:
parent
a28b1e97cc
commit
1b9e980144
@ -94,13 +94,13 @@ def offload_task(taskname, *args, force_sync=False, **kwargs):
|
|||||||
# Retrieve function
|
# Retrieve function
|
||||||
try:
|
try:
|
||||||
_func = getattr(_mod, func)
|
_func = getattr(_mod, func)
|
||||||
except AttributeError:
|
except AttributeError: # pragma: no cover
|
||||||
# getattr does not work for local import
|
# getattr does not work for local import
|
||||||
_func = None
|
_func = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not _func:
|
if not _func:
|
||||||
_func = eval(func)
|
_func = eval(func) # pragma: no cover
|
||||||
except NameError:
|
except NameError:
|
||||||
logger.warning(f"WARNING: '{taskname}' not started - No function named '{func}'")
|
logger.warning(f"WARNING: '{taskname}' not started - No function named '{func}'")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user