diff options
author | Mike Crute <mcrute@gmail.com> | 2015-12-27 08:53:14 -0800 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2015-12-27 08:53:14 -0800 |
commit | f9c57ed04cfb64c5760e154ec94a0046d7878754 (patch) | |
tree | e00925acaf666404ed4a5e25e65050a2719e4a2e /pandora | |
parent | 2afa38488cd0826f923a4ea7ff9d7489f8a45fda (diff) | |
download | pydora-f9c57ed04cfb64c5760e154ec94a0046d7878754.tar.bz2 pydora-f9c57ed04cfb64c5760e154ec94a0046d7878754.tar.xz pydora-f9c57ed04cfb64c5760e154ec94a0046d7878754.zip |
Fix for python3
Diffstat (limited to 'pandora')
-rw-r--r-- | pandora/client.py | 3 | ||||
-rw-r--r-- | pandora/transport.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/pandora/client.py b/pandora/client.py index a11f14c..fafd872 100644 --- a/pandora/client.py +++ b/pandora/client.py | |||
@@ -260,9 +260,10 @@ class APIClient(BaseAPIClient): | |||
260 | 260 | ||
261 | def get_ad_item(self, station_id, ad_token): | 261 | def get_ad_item(self, station_id, ad_token): |
262 | from .models.pandora import AdItem | 262 | from .models.pandora import AdItem |
263 | |||
263 | if not station_id: | 264 | if not station_id: |
264 | raise ValueError("The 'station_id' param must be defined, " | 265 | raise ValueError("The 'station_id' param must be defined, " |
265 | "got: '%s'" % station_id) | 266 | "got: '{}'".format(station_id)) |
266 | 267 | ||
267 | ad_metadata = self.get_ad_metadata(ad_token) | 268 | ad_metadata = self.get_ad_metadata(ad_token) |
268 | ad_metadata["stationId"] = station_id | 269 | ad_metadata["stationId"] = station_id |
diff --git a/pandora/transport.py b/pandora/transport.py index e43a8e3..1a2ee69 100644 --- a/pandora/transport.py +++ b/pandora/transport.py | |||
@@ -75,7 +75,7 @@ def delay_exponential(base, growth_factor, attempts): | |||
75 | base = random.random() | 75 | base = random.random() |
76 | elif base <= 0: | 76 | elif base <= 0: |
77 | raise ValueError("The 'base' param must be greater than 0, " | 77 | raise ValueError("The 'base' param must be greater than 0, " |
78 | "got: %s" % base) | 78 | "got: {}".format(base)) |
79 | time_to_sleep = base * (growth_factor ** (attempts - 1)) | 79 | time_to_sleep = base * (growth_factor ** (attempts - 1)) |
80 | return time_to_sleep | 80 | return time_to_sleep |
81 | 81 | ||