aboutsummaryrefslogtreecommitdiff
path: root/pydora
diff options
context:
space:
mode:
authorjcass <john.cass77@gmail.com>2015-12-28 16:23:57 +0200
committerjcass <john.cass77@gmail.com>2015-12-28 16:23:57 +0200
commitd2a520dbf6257986128d14a6c7d23aa37725d5e3 (patch)
tree847cf884fe129f8ff4d6cfef243b7b55cd3fa720 /pydora
parenteb91a5c00701689085b6f427d62e487f417c6f51 (diff)
downloadpydora-d2a520dbf6257986128d14a6c7d23aa37725d5e3.tar.bz2
pydora-d2a520dbf6257986128d14a6c7d23aa37725d5e3.tar.xz
pydora-d2a520dbf6257986128d14a6c7d23aa37725d5e3.zip
Handle IOErrors and ValueErrors when attempting to register ads.
Diffstat (limited to 'pydora')
-rw-r--r--pydora/utils.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/pydora/utils.py b/pydora/utils.py
index 756810a..275c386 100644
--- a/pydora/utils.py
+++ b/pydora/utils.py
@@ -125,15 +125,6 @@ def iterate_forever(func, *args, **kwargs):
125 yield playlistItem 125 yield playlistItem
126 except StopIteration: 126 except StopIteration:
127 output = func(*args, **kwargs) 127 output = func(*args, **kwargs)
128 except errors.ParameterMissing as e:
129 if isinstance(playlistItem, AdItem):
130 if (not playlistItem.tracking_tokens or
131 len(playlistItem.tracking_tokens) == 0):
132 # Ad item does not contain any tracking tokens, yield
133 # without registering
134 yield playlistItem
135 # Something else went wrong, re-raise
136 raise e
137 128
138 129
139class SilentPopen(subprocess.Popen): 130class SilentPopen(subprocess.Popen):