diff --git a/lib/matplotlib/backends/backend_ps.py b/lib/matplotlib/backends/backend_ps.py index 5da564d086f9..702c7bf63402 100644 --- a/lib/matplotlib/backends/backend_ps.py +++ b/lib/matplotlib/backends/backend_ps.py @@ -84,8 +84,7 @@ def gs_version(self): pass from matplotlib.compat.subprocess import Popen, PIPE - s = Popen(self.gs_exe + " --version", - shell=True, stdout=PIPE) + s = Popen([str(self.gs_exe), " --version"], stdout=PIPE) pipe, stderr = s.communicate() if six.PY3: ver = pipe.decode('ascii')