Browse code

worlddump: log command failure details

If a command we trigger fails for some reason, it's worth logging
details about the failure (like return code).

Change-Id: Ib19aa474eccdd11e138a4f55e125935b621bca05

Ihar Hrachyshka authored on 2016/03/03 23:30:49
Showing 1 changed files
... ...
@@ -58,8 +58,8 @@ def _dump_cmd(cmd):
58 58
     try:
59 59
         subprocess.check_call(cmd, shell=True)
60 60
         print
61
-    except subprocess.CalledProcessError:
62
-        print "*** Failed to run: %s" % cmd
61
+    except subprocess.CalledProcessError as e:
62
+        print "*** Failed to run '%(cmd)s': %(err)s" % {'cmd': cmd, 'err': e}
63 63
 
64 64
 
65 65
 def _find_cmd(cmd):