Skip to content

Commit 095449a

Browse files
committed
Remove workaround for spaces in fig.psconvert prefix
Doesn't work yet, as the filename will contain the 040 octal code, but committing to have the diff available for review.
1 parent 03e4308 commit 095449a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pygmt/figure.py

-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ def psconvert(self, **kwargs):
192192
# Default cropping the figure to True
193193
if "A" not in kwargs:
194194
kwargs["A"] = ""
195-
# allow for spaces in figure name
196-
kwargs["F"] = f'"{kwargs.get("F")}"' if kwargs.get("F") else None
197195
with Session() as lib:
198196
lib.call_module("psconvert", build_arg_string(kwargs))
199197

pygmt/tests/test_figure.py

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def test_figure_savefig_filename_with_spaces():
116116
fig.basemap(region=[0, 1, 0, 1], projection="X1c/1c", frame=True)
117117
with GMTTempFile(prefix="pygmt-filename with spaces", suffix=".png") as imgfile:
118118
fig.savefig(imgfile.name)
119+
assert not r"\040" in os.path.abspath(imgfile.name)
119120
assert os.path.exists(imgfile.name)
120121

121122

0 commit comments

Comments
 (0)