mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Make requesting login form password work on Python 3
This commit is contained in:
parent
8fc0dcc055
commit
9a33c2a659
2 changed files with 1 additions and 8 deletions
|
|
@ -27,13 +27,6 @@ stderr = i18n.get_encoded_writer(out=sys.stderr)
|
|||
stdout = i18n.get_encoded_writer()
|
||||
|
||||
|
||||
def encode (text):
|
||||
"""Encode text with default encoding if its Unicode."""
|
||||
if isinstance(text, unicode):
|
||||
return text.encode(i18n.default_encoding, 'ignore')
|
||||
return text
|
||||
|
||||
|
||||
class StatusLogger (object):
|
||||
"""Standard status logger. Default output is stderr."""
|
||||
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ for entry in config["authentication"]:
|
|||
attrs["strpattern"] = attrs["pattern"].pattern
|
||||
msg = _("Enter LinkChecker password for user %(user)s" \
|
||||
" at %(strpattern)s:") % attrs
|
||||
entry["password"] = getpass.getpass(console.encode(msg))
|
||||
entry["password"] = getpass.getpass(msg)
|
||||
if options.useragent is not None:
|
||||
config["useragent"] = options.useragent
|
||||
if options.cookiefile is not None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue