mirror of
https://github.com/RPCSX/xed.git
synced 2024-11-23 03:29:39 +00:00
elf_sizes: Popen() universal_newlines and exception syntax (linux)
Change-Id: I9bd658ba6c1ec82c28cd062a9118b74d2a9dd66e (cherry picked from commit e93dabbc58bcb2c4a93c0eac34d6c5cfc9d1195a)
This commit is contained in:
parent
f5cc39cfe1
commit
ea2ea38f3e
@ -39,11 +39,12 @@ def _run_cmd(cmd, die_on_errors=True):
|
||||
sub = subprocess.Popen(cmd,
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
stderr=subprocess.STDOUT,
|
||||
universal_newlines=True)
|
||||
lines = sub.stdout.readlines()
|
||||
sub.wait()
|
||||
return (sub.returncode, lines)
|
||||
except OSError, e:
|
||||
except OSError as e:
|
||||
msg = "Execution failed for:" + str( cmd) + ".\nResult is " + str(e)
|
||||
if die_on_errors:
|
||||
_die(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user