Skip to content

Commit 17807ae

Browse files
committed
Fix the message in RuntimeError
1 parent 703b4c4 commit 17807ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sphinx_gmt/gmtplot.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,13 @@ def eval_bash(code, code_dir, output_dir, output_base, config=None):
202202
stderr=subprocess.PIPE,
203203
)
204204
if proc.returncode != 0:
205-
raise RuntimeError(
205+
msg = (
206206
"\nGMT bash failed:\n"
207-
f"{code}"
207+
f"{code}\n"
208208
f"STDOUT: {proc.stdout.decode('utf-8')}"
209209
f"STDERR: {proc.stderr.decode('utf-8')}"
210210
)
211+
raise RuntimeError(msg)
211212
for image in _search_images(tmpdir):
212213
shutil.move(image, Path(output_dir, output_base).with_suffix(image.suffix))
213214
return f"{output_base}.*"

0 commit comments

Comments
 (0)