Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/netrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def _security_check(self, fp, default_netrc, login):
fowner = _getpwuid(prop.st_uid)
user = _getpwuid(current_user_id)
raise NetrcParseError(
(f"~/.netrc file owner ({fowner}, {user}) does not match"
" current user"))
f"~/.netrc file owner ({fowner}) does not match"
f" current user ({user})")
if (prop.st_mode & (stat.S_IRWXG | stat.S_IRWXO)):
raise NetrcParseError(
"~/.netrc access too permissive: access"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:mod:`netrc`: improve the error message when the security check for the
ownership of the default configuration file ``~/.netrc`` fails. Patch by
Bénédikt Tran.
Loading