Skip to content

Commit

Permalink
decode stderr into a more readable error
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Feb 13, 2024
1 parent 4f730f0 commit dc3180c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qffbuddy/qffbuddy.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,9 @@ def open_file(self):
def parse_infile(self, infile):
s = subprocess.run([args.pbqff, "-j", infile], capture_output=True)
if s.returncode != 0:
sys.exit(f"pbqff failed to parse {infile}: {s.stderr}")
sys.exit(
f"pbqff failed to parse {infile}: {s.stderr.decode('utf-8')}"
)
d = json.loads(s.stdout)

geom = d["geometry"]
Expand Down

0 comments on commit dc3180c

Please sign in to comment.