Show More
@@ -312,7 +312,7 b' def _addressencode(ui, name, addr, chars' | |||||
312 | name = headencode(ui, name, charsets) |
|
312 | name = headencode(ui, name, charsets) | |
313 | try: |
|
313 | try: | |
314 | acc, dom = addr.split('@') |
|
314 | acc, dom = addr.split('@') | |
315 |
acc |
|
315 | acc.decode('ascii') | |
316 | dom = dom.decode(encoding.encoding).encode('idna') |
|
316 | dom = dom.decode(encoding.encoding).encode('idna') | |
317 | addr = '%s@%s' % (acc, dom) |
|
317 | addr = '%s@%s' % (acc, dom) | |
318 | except UnicodeDecodeError: |
|
318 | except UnicodeDecodeError: | |
@@ -320,7 +320,7 b' def _addressencode(ui, name, addr, chars' | |||||
320 | except ValueError: |
|
320 | except ValueError: | |
321 | try: |
|
321 | try: | |
322 | # too strict? |
|
322 | # too strict? | |
323 |
addr |
|
323 | addr.decode('ascii') | |
324 | except UnicodeDecodeError: |
|
324 | except UnicodeDecodeError: | |
325 | raise error.Abort(_('invalid local address: %s') % addr) |
|
325 | raise error.Abort(_('invalid local address: %s') % addr) | |
326 | return pycompat.bytesurl( |
|
326 | return pycompat.bytesurl( |
General Comments 0
You need to be logged in to leave comments.
Login now