Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. app = subprocess.Popen(["./converter", "test/test.img", "output"], stdout=None, stderr=subprocess.PIPE)
  2.     output = app.stderr.read()
  3.     print(output.decode("utf-8"))
  4.     crash = b"*** The program has crashed\n"
  5.    
  6.     # check if message finish with the crash msg
  7.     if(output[len(output)-len(crash):] == crash):
  8.         print(output.decode("utf-8"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement