Merge branch 'master' into issue-4178-passphrase

This commit is contained in:
mirosyn 2020-08-31 09:10:38 +03:00 committed by GitHub
commit 99dc31a73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Unreleased: mitmproxy next
* Revamp onboarding app (@mhils)
* Add ASGI support for embedded apps (@mhils)
* Updated raw exports to not remove headers (@wchasekelley)
* Fix file unlinking before external viewer finishes loading (@wchasekelley)
* Add --cert-passphrase command line argument (@mirosyn)
* --- TODO: add new PRs above this line ---

View File

@ -11,6 +11,7 @@ import sys
import tempfile
import typing # noqa
import contextlib
import threading
import urwid
@ -171,7 +172,9 @@ class ConsoleMaster(master.Master):
signals.status_message.send(
message="Can't start external viewer: %s" % " ".join(c)
)
os.unlink(name)
# 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()
def set_palette(self, opts, updated):
self.ui.register_palette(