summaryrefslogtreecommitdiff
path: root/qutebrowser/utils/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/utils/utils.py')
-rw-r--r--qutebrowser/utils/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py
index a56769255..5784d754c 100644
--- a/qutebrowser/utils/utils.py
+++ b/qutebrowser/utils/utils.py
@@ -670,7 +670,8 @@ def yaml_load(f: Union[str, IO[str]]) -> Any:
try:
data = yaml.load(f, Loader=YamlLoader)
except ValueError as e:
- if str(e).startswith('could not convert string to float'):
+ pyyaml_error = 'could not convert string to float'
+ if str(e).startswith(pyyaml_error): # pragma: no cover
# WORKAROUND for https://github.com/yaml/pyyaml/issues/168
raise yaml.YAMLError(e)
raise # pragma: no cover