mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge pull request #6136 from radarhere/imageshow
Fixed calling DisplayViewer or XVViewer without a title
This commit is contained in:
commit
3ce6501228
|
@ -270,8 +270,9 @@ class DisplayViewer(UnixViewer):
|
|||
else:
|
||||
raise TypeError("Missing required argument: 'path'")
|
||||
args = ["display"]
|
||||
if "title" in options:
|
||||
args += ["-title", options["title"]]
|
||||
title = options.get("title")
|
||||
if title:
|
||||
args += ["-title", title]
|
||||
args.append(path)
|
||||
|
||||
subprocess.Popen(args)
|
||||
|
@ -368,8 +369,9 @@ class XVViewer(UnixViewer):
|
|||
else:
|
||||
raise TypeError("Missing required argument: 'path'")
|
||||
args = ["xv"]
|
||||
if "title" in options:
|
||||
args += ["-name", options["title"]]
|
||||
title = options.get("title")
|
||||
if title:
|
||||
args += ["-name", title]
|
||||
args.append(path)
|
||||
|
||||
subprocess.Popen(args)
|
||||
|
|
Loading…
Reference in New Issue
Block a user