Show cause when ~/.netrc can't be read
This commit is contained in:
parent
663d1a4d2f
commit
2029f52fdc
@ -90,6 +90,8 @@ Changed
|
|||||||
- On Qt 5.10 or newer, dictionaries are now read from the qutebrowser data
|
- 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`.
|
directory (e.g. `~/.local/share/qutebrowser`) instead of `/usr/share/qt`.
|
||||||
Existing dictionaries are copied over.
|
Existing dictionaries are copied over.
|
||||||
|
- If an error while parsing `~/.netrc` occurs, the cause of the error is now
|
||||||
|
logged.
|
||||||
|
|
||||||
Fixed
|
Fixed
|
||||||
~~~~~
|
~~~~~
|
||||||
|
@ -312,10 +312,10 @@ def netrc_authentication(url, authenticator):
|
|||||||
(user, _account, password) = authenticators
|
(user, _account, password) = authenticators
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
log.misc.debug("No .netrc file found")
|
log.misc.debug("No .netrc file found")
|
||||||
except OSError:
|
except OSError as e:
|
||||||
log.misc.exception("Unable to read the netrc file")
|
log.misc.exception("Unable to read the netrc file: {}".format(e))
|
||||||
except netrc.NetrcParseError:
|
except netrc.NetrcParseError as e:
|
||||||
log.misc.exception("Error when parsing the netrc file")
|
log.misc.exception("Error when parsing the netrc file: {}".format(e))
|
||||||
|
|
||||||
if user is None:
|
if user is None:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user