projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c96b8bd
)
Runtime exception in listener no longer fails silently (Fixed issue #14).
author
Wayne Moore
<wayne@kotega.com>
Sun, 16 May 2010 08:45:14 +0000
(16:45 +0800)
committer
Joshua Roesslein
<jroesslein@gmail.com>
Wed, 16 Jun 2010 06:48:38 +0000
(14:48 +0800)
tweepy/streaming.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/streaming.py
b/tweepy/streaming.py
index 0ea6436aa0df2cfd51dd2e844b9afdddf1d9eaaf..261fb11e447b66942cbec9526ee721d5e05028e4 100644
(file)
--- a/
tweepy/streaming.py
+++ b/
tweepy/streaming.py
@@
-89,6
+89,7
@@
class Stream(object):
# 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
@@
-114,7
+115,7
@@
class Stream(object):
break
conn.close()
sleep(self.snooze_time)
- except Exception:
+ except Exception
, exception
:
# any other exception is fatal, so kill loop
break
@@
-123,6
+124,9
@@
class Stream(object):
if conn:
conn.close()
+ if exception:
+ raise exception
+
def _read_loop(self, resp):
data = ''
while self.running: