summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-10-21 18:02:36 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-10-21 18:02:36 +0200
commit337ad04fd460a9af0d96a5dff6dc05631e39237e (patch)
tree49ab21ef9bcaa56e80156bd4dc27c756eecfa015
parenta0bfb7c824900881f01c53204d9e8cd0b5b78f53 (diff)
downloadqutebrowser-337ad04fd460a9af0d96a5dff6dc05631e39237e.tar.gz
qutebrowser-337ad04fd460a9af0d96a5dff6dc05631e39237e.zip
utils: Don't require coverage for old PyYAML workaround
-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