pipe = os.popen(c, 'rb')
val = pipe.read()
- if pipe.close():
- sys.stderr.write('Command failed: %s' % c)
+ if pipe.close() and not ignore_error:
- sys.stderr.write('Command %s failed\n' % c)
++ sys.stderr.write('Command failed: %s\n' % c)
sys.exit(1)
return val
pipe = os.popen(c, 'rb')
val = pipe.readlines()
if pipe.close():
- sys.stderr.write('Command %s failed\n' % c)
- sys.stderr.write('Command failed: %s' % c)
++ sys.stderr.write('Command failed: %s\n' % c)
sys.exit(1)
return val