Skip to content

Commit

Permalink
cleaning setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Mar 5, 2021
1 parent f402eae commit b7453aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ def get_start_text(cmd):
return ""
else:
print(" command valid. Trying " + cmd)
with subprocess.Popen(cmd,
try:
with subprocess.Popen(cmd,
bufsize=1,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE) as pr:
starttext = pr.communicate(timeout=5)[0].decode().strip()
starttext = pr.communicate(timeout=5)[0].decode().strip()
except Exception as e:
print(e)
return ""
# only head is required, thus crop
# strip removes leading LF or CR+LF in case of the mathics banner
print("starttext='''", starttext, "'''")
Expand Down

0 comments on commit b7453aa

Please sign in to comment.