Skip to content

Commit

Permalink
Remove workaround for spaces in fig.psconvert prefix
Browse files Browse the repository at this point in the history
Doesn't work yet, as the filename will contain the 040 octal
code, but committing to have the diff available for review.
weiji14 committed Sep 7, 2021
1 parent 03e4308 commit 095449a
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions pygmt/figure.py
Original file line number Diff line number Diff line change
@@ -192,8 +192,6 @@ def psconvert(self, **kwargs):
# Default cropping the figure to True
if "A" not in kwargs:
kwargs["A"] = ""
# allow for spaces in figure name
kwargs["F"] = f'"{kwargs.get("F")}"' if kwargs.get("F") else None
with Session() as lib:
lib.call_module("psconvert", build_arg_string(kwargs))

1 change: 1 addition & 0 deletions pygmt/tests/test_figure.py
Original file line number Diff line number Diff line change
@@ -116,6 +116,7 @@ def test_figure_savefig_filename_with_spaces():
fig.basemap(region=[0, 1, 0, 1], projection="X1c/1c", frame=True)
with GMTTempFile(prefix="pygmt-filename with spaces", suffix=".png") as imgfile:
fig.savefig(imgfile.name)
assert not r"\040" in os.path.abspath(imgfile.name)
assert os.path.exists(imgfile.name)


0 comments on commit 095449a

Please sign in to comment.