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
diff --git a/tools/worlddump.py b/tools/worlddump.py
index 01f601c..72a257f 100755
--- a/tools/worlddump.py
+++ b/tools/worlddump.py
@@ -58,8 +58,8 @@
try:
subprocess.check_call(cmd, shell=True)
print
- except subprocess.CalledProcessError:
- print "*** Failed to run: %s" % cmd
+ except subprocess.CalledProcessError as e:
+ print "*** Failed to run '%(cmd)s': %(err)s" % {'cmd': cmd, 'err': e}
def _find_cmd(cmd):