explain why we wait before deletion in spawn_external_viewer

This commit is contained in:
Maximilian Hils 2020-08-29 01:31:49 +02:00 committed by GitHub
parent b74a2f4e45
commit 8df5e31a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,7 @@ class ConsoleMaster(master.Master):
signals.status_message.send( signals.status_message.send(
message="Can't start external viewer: %s" % " ".join(c) message="Can't start external viewer: %s" % " ".join(c)
) )
# small delay before removing the file # add a small delay before deletion so that the file is not removed before being loaded by the viewer
t = threading.Timer(1.0, os.unlink, args=[name]) t = threading.Timer(1.0, os.unlink, args=[name])
t.start() t.start()