From: Orakaro Date: Sun, 11 Dec 2016 13:24:02 +0000 (+0900) Subject: Exit While loop instead of hangup all application. X-Git-Url: https://vcs.fsf.org/?p=rainbowstream.git;a=commitdiff_plain;h=3d60673ae4d520a9b910c6b68d9a6d15286ff470 Exit While loop instead of hangup all application. --- diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index 118667c..a499f95 100644 --- 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] + '.')