Merge pull request #24 from pyth-network/fix/subprocess
fix: add stdout, err to output
This commit is contained in:
commit
82b1cf8fd9
|
@ -220,7 +220,7 @@ while True:
|
|||
ATTESTATIONS["pendingSeqnos"].append(seqno)
|
||||
|
||||
else:
|
||||
logging.warn("Warning: Could not get sequence number")
|
||||
logging.warning("Warning: Could not get sequence number")
|
||||
|
||||
time.sleep(P2W_ATTEST_INTERVAL)
|
||||
nonce += 1
|
||||
|
|
|
@ -41,7 +41,10 @@ def run_or_die(args, die=True, **kwargs):
|
|||
ret = subprocess.run(args, text=True, **kwargs)
|
||||
|
||||
if ret.returncode != 0:
|
||||
logging.error(f"Return code is: {ret.returncode}")
|
||||
if str(ret.stdout) != '':
|
||||
logging.info(f"STDOUT: {ret.stdout}")
|
||||
if str(ret.stderr) != '':
|
||||
logging.error(f"STDERR: {ret.stderr}")
|
||||
if die:
|
||||
sys.exit(ret.returncode)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue