X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=cdist;h=0aa4fd2d9587fae1832c81571f4aff1b4796f6e2;hb=0da3845cd2dcb59fd4e407b85274aba389d7c2d6;hp=7efa7ea0fc3a884765f8905190a9b51358ba2c8f;hpb=aba0e545edeaac71bd06278fd29aa36433f028dc;p=cdist.git diff --git a/cdist b/cdist index 7efa7ea..0aa4fd2 100755 --- a/cdist +++ b/cdist @@ -259,9 +259,9 @@ def command(c): try: r = subprocess.run(c, shell=True) if r.returncode != 0: - raise Error(f'command {c} failed ({r.returncode})') + raise Error('command %s failed (%d)' % (c, r.returncode)) except Exception as e: - raise Error(f'command {c} failed ({e})') + raise Error('command %s failed (%s)' % (c, e)) def command_and_read(c): log_normal(c)