mercurial/url.py
changeset 28861 86db5cb55d46
parent 26806 ec12ebe20200
child 28883 032c4c2f802a
--- 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)