Mercurial > hg
diff mercurial/url.py @ 28861:86db5cb55d46
pycompat: switch to util.stringio for py3 compat
author | timeless <timeless@mozdev.org> |
---|---|
date | Sun, 10 Apr 2016 20:55:37 +0000 |
parents | ec12ebe20200 |
children | 032c4c2f802a |
line wrap: on
line diff
--- a/mercurial/url.py Sun Apr 10 21:32:08 2016 +0000 +++ b/mercurial/url.py Sun Apr 10 20:55:37 2016 +0000 @@ -10,7 +10,6 @@ from __future__ import absolute_import import base64 -import cStringIO import httplib import os import socket @@ -25,6 +24,7 @@ sslutil, util, ) +stringio = util.stringio class passwordmgr(urllib2.HTTPPasswordMgrWithDefaultRealm): def __init__(self, ui): @@ -273,7 +273,7 @@ res.length = None res.chunked = 0 res.will_close = 1 - res.msg = httplib.HTTPMessage(cStringIO.StringIO()) + res.msg = httplib.HTTPMessage(stringio()) return False res.msg = httplib.HTTPMessage(res.fp)