mirror of
https://github.com/KrystianD/mikrotik_configurator.git
synced 2025-06-20 17:47:44 +02:00
added printing error to stdout
This commit is contained in:
parent
485a995855
commit
0aebb4a69a
@ -160,10 +160,11 @@ def main():
|
||||
if args.reset:
|
||||
subprocess.run(cargs)
|
||||
else:
|
||||
out = subprocess.check_output(cargs).decode("utf-8")
|
||||
p = subprocess.run(cargs, stdout=subprocess.PIPE)
|
||||
out = p.stdout.decode("utf-8")
|
||||
|
||||
if "Script file loaded and executed successfully" not in out:
|
||||
print("Script error")
|
||||
print("Script error", out)
|
||||
exit(1)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user