Skip to content

Commit

Permalink
Runtime exception in listener no longer fails silently (Fixed issue #14
Browse files Browse the repository at this point in the history
…).
  • Loading branch information
waynemoore authored and joshthecoder committed Jun 16, 2010
1 parent c96b8bd commit 4c03a2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tweepy/streaming.py
Expand Up @@ -89,6 +89,7 @@ def _run(self):
# enter loop
error_counter = 0
conn = None
exception = None
while self.running:
if self.retry_count and error_counter > self.retry_count:
# quit if error count greater than retry count
Expand All @@ -114,7 +115,7 @@ def _run(self):
break
conn.close()
sleep(self.snooze_time)
except Exception:
except Exception, exception:
# any other exception is fatal, so kill loop
break

Expand All @@ -123,6 +124,9 @@ def _run(self):
if conn:
conn.close()

if exception:
raise exception

def _read_loop(self, resp):
data = ''
while self.running:
Expand Down

0 comments on commit 4c03a2b

Please sign in to comment.