Skip to content

Commit

Permalink
Merge pull request #6136 from radarhere/imageshow
Browse files Browse the repository at this point in the history
Fixed calling DisplayViewer or XVViewer without a title
  • Loading branch information
hugovk committed Mar 24, 2022
2 parents e5ce1c8 + f3b7ee2 commit 3ce6501
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/PIL/ImageShow.py
Expand Up @@ -270,8 +270,9 @@ def show_file(self, path=None, **options):
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)
Expand Down Expand Up @@ -368,8 +369,9 @@ def show_file(self, path=None, **options):
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)
Expand Down

0 comments on commit 3ce6501

Please sign in to comment.