On this page
netrc.NetrcParseError
Prev: netrc.netrc | Up: netrc
Rel: netrc.netrc
Ref: docs.python.org โ netrc.NetrcParseError
Tags: #public #python3 #stdlib #netrc
Import
import netrc
from netrc import NetrcParseError
Signature & Overview
netrc.NetrcParseError(msg, filename=None, lineno=None)
Exception raised on syntax errors in the .netrc file.
Methods & Attributes
NetrcParseError.add_note(self, note, /)โ Add a note to the exceptionNetrcParseError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import netrc
assert issubclass(netrc.NetrcParseError, Exception)
Gotchas
- Raised on syntax errors OR insecure file permissions (group/other-readable
.netrcon Unix).
REPL Inspect
from netrc import NetrcParseError
help(NetrcParseError)
Linked from
Related notes
- tuts/python3/stdlib_module/netrc/netrc Linked here; links to this page; shared tags: #netrc, #stdlib
- tuts/python3/stdlib_module/netrc links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib
- tuts/c/stdlib/ctype/isdigit shared tags: #stdlib
- tuts/c/stdlib/ctype/isspace shared tags: #stdlib