diff options
-rw-r--r-- | cloudinit/helpers.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/helpers.py b/cloudinit/helpers.py index e5c45632..3fd819b3 100644 --- a/cloudinit/helpers.py +++ b/cloudinit/helpers.py @@ -150,7 +150,7 @@ class Runners(object): args = [] if sem.has_run(name, freq): LOG.info("%s already ran (freq=%s)", name, freq) - return None + return (False, None) with sem.lock(name, freq, clear_on_fail) as lk: if not lk: raise LockFailure("Failed to acquire lock for %s" % name) @@ -158,9 +158,10 @@ class Runners(object): LOG.debug("Running %s with args %s using lock %s", functor, args, lk) if isinstance(args, (dict)): - return functor(**args) + results = functor(**args) else: - return functor(*args) + results = functor(*args) + return (True, results) class ContentHandlers(object): |