mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Avoid race condition when displaying images with eog
Image.show() expects its display command to run synchronously, but eog is asynchronous if there's another instance already running -- it just asks the other instance to open the file and then immediately exits. This causes intermittent failures where the file gets deleted before the running eog instance manages to open it. Fix this by using the -n option, so eog starts a new instance each time instead of trying to reuse an existing one.
This commit is contained in:
parent
cc2db17271
commit
5c8aa277ce
|
@ -207,7 +207,8 @@ class EogViewer(UnixViewer):
|
|||
"""The GNOME Image Viewer ``eog`` command."""
|
||||
|
||||
def get_command_ex(self, file, **options):
|
||||
command = executable = "eog"
|
||||
executable = "eog"
|
||||
command = "eog -n"
|
||||
return command, executable
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user