Mercurial > hg
comparison mercurial/debugcommands.py @ 39064:a2fa7247ca70
debugcommands: get_method should always return a sysstr
Differential Revision: https://phab.mercurial-scm.org/D4257
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 10 Aug 2018 03:31:23 -0400 |
parents | efeeb73f54c3 |
children | 730e7d92a023 |
comparison
equal
deleted
inserted
replaced
39063:1419ba5e3b56 | 39064:a2fa7247ca70 |
---|---|
3199 req = urlmod.urlreq.request(pycompat.strurl(url), body, headers) | 3199 req = urlmod.urlreq.request(pycompat.strurl(url), body, headers) |
3200 | 3200 |
3201 # urllib.Request insists on using has_data() as a proxy for | 3201 # urllib.Request insists on using has_data() as a proxy for |
3202 # determining the request method. Override that to use our | 3202 # determining the request method. Override that to use our |
3203 # explicitly requested method. | 3203 # explicitly requested method. |
3204 req.get_method = lambda: method | 3204 req.get_method = lambda: pycompat.sysstr(method) |
3205 | 3205 |
3206 try: | 3206 try: |
3207 res = opener.open(req) | 3207 res = opener.open(req) |
3208 body = res.read() | 3208 body = res.read() |
3209 except util.urlerr.urlerror as e: | 3209 except util.urlerr.urlerror as e: |