Skip to content
Snippets Groups Projects
Commit 52cd2320 authored by Jordy Gloudemans's avatar Jordy Gloudemans
Browse files

Seperated Linux and Windows subprocess calls.

parent 2c53fb13
No related branches found
No related tags found
No related merge requests found
......@@ -205,9 +205,12 @@ class pulsar_dummy_transport(transport):
fid.write(q1asm_str)
fid.close()
assembler = "q1asm.exe" if os.name == 'nt' else "q1asm"
assembler_path = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../assembler/" + assembler)
proc = subprocess.Popen([assembler_path + " -o tmp tmp.q1asm"], shell=True, text=True, bufsize=1, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if os.name == 'nt':
assembler_path = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../assembler/q1asm.exe")
proc = subprocess.Popen([assembler_path, "-o", "tmp", "tmp.q1asm"], shell=True, text=True, bufsize=1, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
else:
assembler_path = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../assembler/q1asm")
proc = subprocess.Popen([assembler_path + " -o tmp tmp.q1asm"], shell=True, text=True, bufsize=1, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
self._asm_log = proc.communicate()[0]
self._asm_success = True if proc.returncode == 0 else False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment