mercurial/mail.py
branchstable
changeset 46024 07b0a687c01a
parent 43825 8f26dd09aa78
child 45942 89a2afe31e82
equal deleted inserted replaced
46023:139b334c9392 46024:07b0a687c01a
   155     if username:
   155     if username:
   156         if password:
   156         if password:
   157             password = encoding.strfromlocal(password)
   157             password = encoding.strfromlocal(password)
   158         else:
   158         else:
   159             password = ui.getpass()
   159             password = ui.getpass()
       
   160             if password is not None:
       
   161                 password = encoding.strfromlocal(password)
   160     if username and password:
   162     if username and password:
   161         ui.note(_(b'(authenticating to mail server as %s)\n') % username)
   163         ui.note(_(b'(authenticating to mail server as %s)\n') % username)
   162         username = encoding.strfromlocal(username)
   164         username = encoding.strfromlocal(username)
   163         try:
   165         try:
   164             s.login(username, password)
   166             s.login(username, password)