wrap: default values for netrc are empty string from python 3.11

From python 3.11 [1]:

> The entry in the netrc file no longer needs to contain all tokens.  The missing
> tokens' value default to an empty string.  All the tokens and their values now
> can contain arbitrary characters, like whitespace and non-ASCII characters.
> If the login name is anonymous, it won't trigger the security check.

[1] 15409c720b
This commit is contained in:
Ruben Gonzalez 2024-02-01 15:38:32 +01:00 committed by Eli Schwartz
parent dfd22db4be
commit ee479ded3f
1 changed files with 1 additions and 1 deletions

View File

@ -654,7 +654,7 @@ class Resolver:
return None
login, account, password = self.netrc.authenticators(netloc)
if account is not None:
if account:
login = account
return login, password