mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-24 15:50:33 +03:00
Do not pass None to subprocess
This commit is contained in:
parent
6faebd3ff3
commit
f3b7ee2d3e
|
@ -270,8 +270,9 @@ class DisplayViewer(UnixViewer):
|
||||||
else:
|
else:
|
||||||
raise TypeError("Missing required argument: 'path'")
|
raise TypeError("Missing required argument: 'path'")
|
||||||
args = ["display"]
|
args = ["display"]
|
||||||
if "title" in options:
|
title = options.get("title")
|
||||||
args += ["-title", options["title"]]
|
if title:
|
||||||
|
args += ["-title", title]
|
||||||
args.append(path)
|
args.append(path)
|
||||||
|
|
||||||
subprocess.Popen(args)
|
subprocess.Popen(args)
|
||||||
|
@ -368,8 +369,9 @@ class XVViewer(UnixViewer):
|
||||||
else:
|
else:
|
||||||
raise TypeError("Missing required argument: 'path'")
|
raise TypeError("Missing required argument: 'path'")
|
||||||
args = ["xv"]
|
args = ["xv"]
|
||||||
if "title" in options:
|
title = options.get("title")
|
||||||
args += ["-name", options["title"]]
|
if title:
|
||||||
|
args += ["-name", title]
|
||||||
args.append(path)
|
args.append(path)
|
||||||
|
|
||||||
subprocess.Popen(args)
|
subprocess.Popen(args)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user