From 7de0b85dda94144add6f2076d1eb4b43011a43d3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 18 Sep 2014 16:15:57 +0200 Subject: [PATCH] safe_shlex_split: Adjust docstring --- qutebrowser/utils/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index 820b0086d..70da55176 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -102,7 +102,7 @@ def safe_shlex_split(s): r"""Split a string via shlex safely (don't bail out on unbalanced quotes). We split while the user is typing (for completion), and as - soon as " or \ is typed, the string is invalid for shlex, + soon as ", ' or \ is typed, the string is invalid for shlex, because it encounters EOF while in quote/escape state. Here we fix this error temporarely so shlex doesn't blow up, @@ -110,6 +110,8 @@ def safe_shlex_split(s): Since shlex raises ValueError in both cases we unfortunately have to parse the exception string... + + We try 3 times so multiple errors can be fixed. """ if s is None: raise TypeError("Can't split None!")