evals error out on gh action

This commit is contained in:
Matthias 2022-03-13 20:44:55 +01:00
parent a28b1e97cc
commit 1b9e980144
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -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