diff options
-rw-r--r-- | qutebrowser/utils/utils.py | 3 |
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 |