From 8df5e31a1993b9ca0cc93eba7ec545f2b7533cf7 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 29 Aug 2020 01:31:49 +0200 Subject: [PATCH] explain why we wait before deletion in spawn_external_viewer --- mitmproxy/tools/console/master.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/tools/console/master.py b/mitmproxy/tools/console/master.py index ab1d84142..940f379fd 100644 --- a/mitmproxy/tools/console/master.py +++ b/mitmproxy/tools/console/master.py @@ -172,7 +172,7 @@ class ConsoleMaster(master.Master): signals.status_message.send( 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.start()