diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-05-30 12:53:19 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-05-30 12:56:41 +0200 |
commit | 6b8ff8daed202f4cd0aa5636a92084d1f19f61c8 (patch) | |
tree | 1e548b2ab8f07d7f202ecb64ecc5ea5f058837e6 /qutebrowser/misc/editor.py | |
parent | b9214e05c3214de6ef33c9d79f2b13e7beed7962 (diff) | |
download | qutebrowser-6b8ff8daed202f4cd0aa5636a92084d1f19f61c8.tar.gz qutebrowser-6b8ff8daed202f4cd0aa5636a92084d1f19f61c8.zip |
Handle un-encodable initial text for editor
(cherry picked from commit c74d1075620f54d8904b9ae822299ba1221450f4)
Diffstat (limited to 'qutebrowser/misc/editor.py')
-rw-r--r-- | qutebrowser/misc/editor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qutebrowser/misc/editor.py b/qutebrowser/misc/editor.py index 5741c6b47..d561a7b96 100644 --- a/qutebrowser/misc/editor.py +++ b/qutebrowser/misc/editor.py @@ -131,7 +131,7 @@ class ExternalEditor(QObject): raise ValueError("Already editing a file!") try: self._filename = self._create_tempfile(text, 'qutebrowser-editor-') - except OSError as e: + except (OSError, UnicodeEncodeError) as e: message.error("Failed to create initial file: {}".format(e)) return |