diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 58cc880c4..c919eac5c 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -90,6 +90,8 @@ Changed - On Qt 5.10 or newer, dictionaries are now read from the qutebrowser data directory (e.g. `~/.local/share/qutebrowser`) instead of `/usr/share/qt`. Existing dictionaries are copied over. +- If an error while parsing `~/.netrc` occurs, the cause of the error is now + logged. Fixed ~~~~~ diff --git a/qutebrowser/browser/shared.py b/qutebrowser/browser/shared.py index 8ebbe3926..31f00f52c 100644 --- a/qutebrowser/browser/shared.py +++ b/qutebrowser/browser/shared.py @@ -312,10 +312,10 @@ def netrc_authentication(url, authenticator): (user, _account, password) = authenticators except FileNotFoundError: log.misc.debug("No .netrc file found") - except OSError: - log.misc.exception("Unable to read the netrc file") - except netrc.NetrcParseError: - log.misc.exception("Error when parsing the netrc file") + except OSError as e: + log.misc.exception("Unable to read the netrc file: {}".format(e)) + except netrc.NetrcParseError as e: + log.misc.exception("Error when parsing the netrc file: {}".format(e)) if user is None: return False