Fix format character.
[cdist.git] / cdist
diff --git a/cdist b/cdist
index 10bed90f89262b3656d0d6ca844b6516090fad45..0aa4fd2d9587fae1832c81571f4aff1b4796f6e2 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -256,13 +256,12 @@ def rmtree(a):
 
 def command(c):
     log_normal(c)
-    posix = sys.platform != 'win32'
     try:
-        r = subprocess.run(shlex.split(c, posix=posix), shell=True)
+        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)