Skip to content

Commit 4ec2be7

Browse files
author
Sakari Rautiainen
committed
Fix: python2 debug output
1 parent 736098d commit 4ec2be7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testdroid/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,10 @@ def cli(self, parser, commands):
801801

802802
if options.debug:
803803
logger.setLevel(logging.DEBUG)
804-
http.client.HTTPConnection.debuglevel = 1
804+
if sys.version_info[0] > 2:
805+
http.client.HTTPConnection.debuglevel = 1
806+
else:
807+
httplib.HTTPConnection.debuglevel = 1
805808
logging.getLogger().setLevel(logging.DEBUG)
806809
requests_log = logging.getLogger("requests.packages.urllib3")
807810
requests_log.setLevel(logging.DEBUG)

0 commit comments

Comments
 (0)