osmodumpdoc: print called commands and OSError messages

Change-Id: Ib044cbb8a1b8e02cbe6852f785c75b5c7aae6174
This commit is contained in:
Neels Hofmeyr 2017-09-18 16:02:55 +02:00
parent 8e4806c5f2
commit a784f2407b
1 changed files with 3 additions and 1 deletions

View File

@ -42,9 +42,11 @@ def dump_configs(apps, configs, confpath):
print "Starting app for %s" % appname
proc = None
cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])]
print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)
try:
proc = subprocess.Popen(cmd, stdin=None, stdout=None)
except OSError: # Probably a missing binary
except OSError as e: # Probably a missing binary
print >> sys.stderr, e
print >> sys.stderr, "Skipping app %s" % appname
failures += 1
else: