Also catch re.error on cssutils import

cssutils 1.0 and earlier are broken on Python 3.5 due to a bad regex
escape.
This commit is contained in:
Daniel 2015-10-07 11:24:25 +02:00
parent 957d68c477
commit 1902e4858f

View File

@ -37,7 +37,10 @@ from qutebrowser.utils import log, objreg, message, usertypes
try:
import cssutils
except ImportError:
except (ImportError, re.error):
# Catching re.error because cssutils in earlier releases (<= 1.0) is broken
# on Python 3.5
# See https://bitbucket.org/cthedot/cssutils/issues/52
cssutils = None
_File = collections.namedtuple('_File',