projects
/
rainbowstream.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc92df2
)
Exit While loop instead of hangup all application.
author
Orakaro
<nhatminh_179@hotmail.com>
Sun, 11 Dec 2016 13:24:02 +0000
(22:24 +0900)
committer
Orakaro
<nhatminh_179@hotmail.com>
Sun, 11 Dec 2016 13:29:07 +0000
(22:29 +0900)
rainbowstream/rainbow.py
patch
|
blob
|
blame
|
history
diff --git
a/rainbowstream/rainbow.py
b/rainbowstream/rainbow.py
index 118667c674e7ce41aa2a50db2a0b1fd1e4ba57b2..a499f957bf519875b062352368eb7a1724af299f 100644
(file)
--- a/
rainbowstream/rainbow.py
+++ b/
rainbowstream/rainbow.py
@@
-938,8
+938,9
@@
def ls():
# 300 users means 15 calls to the related API. The rate limit is 15
# calls per 15mn periods (see Twitter documentation).
if ( number_of_users % 300 == 0 ):
- printNicely( '(waiting 16mn for rate limits reasons...)' )
- time.sleep(16*60)
+ printNicely(light_yellow( 'We reached the limit of Twitter API.' ))
+ printNicely(light_yellow( 'You may need to wait about 15 minutes.' ))
+ break
printNicely('All: ' + str(number_of_users) + ' ' + d[target] + '.')