This repository was archived by the owner on Feb 21, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717import sys
1818
1919# Third party libraries
20- from six .moves import cStringIO as StringIO # Used by tests
2120import six
2221
2322
Original file line number Diff line number Diff line change @@ -103,12 +103,9 @@ def debug():
103103 """
104104 Activate debugging on urllib2.
105105 """
106- if six .PY2 :
107- handler = HTTPSHandler (debuglevel = 1 )
108- opener = build_opener (handler )
109- install_opener (opener )
110- else :
111- http_client .HTTPConnection .debuglevel = 1
106+ handler = HTTPSHandler (debuglevel = 1 )
107+ opener = build_opener (handler )
108+ install_opener (opener )
112109
113110 @classmethod
114111 def fixUTF8 (cls , data ): # Ensure proper encoding for UA's servers...
Original file line number Diff line number Diff line change 1616import unittest
1717
1818# Third party imports
19+ from six .moves import cStringIO as StringIO
1920from six .moves import urllib
2021
2122# Local imports
2627class UAMPythonTestCase (unittest .TestCase ):
2728
2829 def setUp (self ):
29- self ._buffer = HTTPLog . StringIO ()
30+ self ._buffer = StringIO ()
3031 # Capture HTTP output in readible fashion
3132 HTTPLog .consume (self ._buffer )
3233 Tracker .HTTPPost .debug () # Enabled debugging from urllib2
You can’t perform that action at this time.
0 commit comments