This commit is contained in:
Florian Bruhin 2014-09-18 17:25:48 +02:00
parent 7f76c3ba13
commit 906a049382
3 changed files with 6 additions and 7 deletions

View File

@ -27,8 +27,6 @@ Module attributes:
pyeval_output: The output of the last :pyeval command. pyeval_output: The output of the last :pyeval command.
""" """
import traceback
from PyQt5.QtNetwork import QNetworkReply from PyQt5.QtNetwork import QNetworkReply
import qutebrowser import qutebrowser

View File

@ -133,7 +133,7 @@ def safe_shlex_split(s):
raise raise
# eggs "bacon ham -> eggs "bacon ham" # eggs "bacon ham -> eggs "bacon ham"
# eggs\ -> eggs\\ # eggs\ -> eggs\\
if lexer.state not in "\"'\\": if lexer.state not in lexer.escape + lexer.quotes:
raise AssertionError( raise AssertionError(
"Lexer state is >{}< while parsing >{}< (attempted fixup: " "Lexer state is >{}< while parsing >{}< (attempted fixup: "
">{}<)".format(lexer.state, orig_s, s)) ">{}<)".format(lexer.state, orig_s, s))
@ -141,8 +141,9 @@ def safe_shlex_split(s):
else: else:
return tokens return tokens
# We should never arrive here. # We should never arrive here.
raise AssertionError("Gave up splitting >{}< after {} tries. " raise AssertionError(
"Attempted fixup: >{}<.".format(orig_s, i, s)) "Gave up splitting >{}< after {} tries. Attempted fixup: >{}<.".format(
orig_s, i, s)) # pylint: disable=undefined-loop-variable
def pastebin(text): def pastebin(text):
@ -560,7 +561,7 @@ class prevent_exceptions: # pylint: disable=invalid-name
retval = self.retval retval = self.retval
@functools.wraps(func) @functools.wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs): # pylint: disable=missing-docstring
try: try:
return func(*args, **kwargs) return func(*args, **kwargs)
except BaseException: except BaseException:

View File

@ -124,7 +124,7 @@ def _module_versions():
""" """
lines = [] lines = []
try: try:
import sipconfig import sipconfig # pylint: disable=import-error,unused-variable
except ImportError: except ImportError:
pass pass
else: else: