Fix python 3.6 support for unnamed.py

This commit is contained in:
mid-kid 2019-02-10 00:17:19 +01:00
parent f04f31ea85
commit 1bc1673794

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from sys import stderr, exit from sys import stderr, exit
from subprocess import run from subprocess import Popen, PIPE
from struct import unpack, calcsize from struct import unpack, calcsize
from enum import Enum from enum import Enum
@ -37,8 +37,8 @@ args = parser.parse_args()
# Get list of object files # Get list of object files
objects = None objects = None
if args.rootdir: if args.rootdir:
for line in run(["make", "-C", args.rootdir, "-s", "-p"], for line in Popen(["make", "-C", args.rootdir, "-s", "-p"],
capture_output=True).stdout.decode().split("\n"): stdout=PIPE).stdout.read().decode().split("\n"):
if line.startswith("crystal_obj := "): if line.startswith("crystal_obj := "):
objects = line[15:].strip().split() objects = line[15:].strip().split()
break break