summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Miller <github@mikeage.net>2017-08-26 22:46:39 +0300
committerMike Miller <github@mikeage.net>2017-08-26 22:46:39 +0300
commitc56a7456e042cc6538a8aa1b30caa597185c2be7 (patch)
tree975f276ea0f2df365753f5ce2f0474e9e5fb9757
parentbb14b88cc23005aae38882e634c84e4de1d0e251 (diff)
downloadurllib3-c56a7456e042cc6538a8aa1b30caa597185c2be7.tar.gz
Simplify debug print
-rw-r--r--urllib3/connectionpool.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py
index 6233b979..85be0b46 100644
--- a/urllib3/connectionpool.py
+++ b/urllib3/connectionpool.py
@@ -205,8 +205,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
"""
self.num_connections += 1
log.debug("Starting new HTTP connection (%d): %s:%s",
- self.num_connections, self.host,
- self.port if self.port else "80")
+ self.num_connections, self.host, self.port or "80")
conn = self.ConnectionCls(host=self.host, port=self.port,
timeout=self.timeout.connect_timeout,
@@ -822,8 +821,7 @@ class HTTPSConnectionPool(HTTPConnectionPool):
"""
self.num_connections += 1
log.debug("Starting new HTTPS connection (%d): %s:%s",
- self.num_connections, self.host,
- self.port if self.port else "443")
+ self.num_connections, self.host, self.port or "443")
if not self.ConnectionCls or self.ConnectionCls is DummyConnection:
raise SSLError("Can't connect to HTTPS URL because the SSL "