aboutsummaryrefslogtreecommitdiff
path: root/pandora/transport.py
diff options
context:
space:
mode:
Diffstat (limited to 'pandora/transport.py')
-rw-r--r--pandora/transport.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pandora/transport.py b/pandora/transport.py
index 6f1a174..721882d 100644
--- a/pandora/transport.py
+++ b/pandora/transport.py
@@ -94,12 +94,12 @@ class RetryingSession(requests.Session):
94 """ 94 """
95 95
96 def __init__(self): 96 def __init__(self):
97 super(RetryingSession, self).__init__() 97 super().__init__()
98 self.mount('https://', HTTPAdapter(max_retries=3)) 98 self.mount('https://', HTTPAdapter(max_retries=3))
99 self.mount('http://', HTTPAdapter(max_retries=3)) 99 self.mount('http://', HTTPAdapter(max_retries=3))
100 100
101 101
102class APITransport(object): 102class APITransport:
103 """Pandora API Transport 103 """Pandora API Transport
104 104
105 The transport is responsible for speaking the low-level protocol required 105 The transport is responsible for speaking the low-level protocol required
@@ -161,7 +161,7 @@ class APITransport(object):
161 return int(self.server_sync_time + (time.time() - self.start_time)) 161 return int(self.server_sync_time + (time.time() - self.start_time))
162 162
163 def remove_empty_values(self, data): 163 def remove_empty_values(self, data):
164 return dict((k, v) for k, v in data.items() if v is not None) 164 return {k: v for k, v in data.items() if v is not None}
165 165
166 @sync_time.setter 166 @sync_time.setter
167 def sync_time(self, sync_time): 167 def sync_time(self, sync_time):
@@ -198,7 +198,7 @@ class APITransport(object):
198 } 198 }
199 199
200 def _build_url(self, method): 200 def _build_url(self, method):
201 return "{0}://{1}".format( 201 return "{}://{}".format(
202 "https" if method in self.REQUIRE_TLS else "http", 202 "https" if method in self.REQUIRE_TLS else "http",
203 self.api_host) 203 self.api_host)
204 204
@@ -236,7 +236,7 @@ class APITransport(object):
236 return self._parse_response(result) 236 return self._parse_response(result)
237 237
238 238
239class BlowfishCryptor(object): 239class BlowfishCryptor:
240 """Low-Level Blowfish Cryptography 240 """Low-Level Blowfish Cryptography
241 241
242 Handles symmetric Blowfish cryptography of raw byte messages with or 242 Handles symmetric Blowfish cryptography of raw byte messages with or
@@ -285,7 +285,7 @@ class PurePythonBlowfish(BlowfishCryptor):
285 return b"".join(self.cipher.encrypt_ecb(self._add_padding(data))) 285 return b"".join(self.cipher.encrypt_ecb(self._add_padding(data)))
286 286
287 287
288class Encryptor(object): 288class Encryptor:
289 """Pandora Blowfish Encryptor 289 """Pandora Blowfish Encryptor
290 290
291 The blowfish encryptor can encrypt and decrypt the relevant parts of the 291 The blowfish encryptor can encrypt and decrypt the relevant parts of the