Skip to content
Browse files

Fixed another long code line

  • Loading branch information...
1 parent 3597294 commit 87cbacdffef067d4bed1370df2ea51ba605ee7cd @ptwobrussell committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 recipe__make_twitter_request.py
View
7 recipe__make_twitter_request.py
@@ -24,8 +24,8 @@ def handle_http_error(e, t, wait_period=2):
print >> sys.stderr, 'Encountered 401 Error (Not Authorized)'
return None
elif e.e.code in (502, 503):
- print >> sys.stderr, 'Encountered %i Error. Will retry in %i seconds' % (e.e.code,
- wait_period)
+ print >> sys.stderr, 'Encountered %i Error. Will retry in %i seconds' % \
+ (e.e.code, wait_period)
time.sleep(wait_period)
wait_period *= 1.5
return wait_period
@@ -34,7 +34,8 @@ def handle_http_error(e, t, wait_period=2):
now = time.time() # UTC
when_rate_limit_resets = status['reset_time_in_seconds'] # UTC
sleep_time = when_rate_limit_resets - now
- print >> sys.stderr, 'Rate limit reached: sleeping for %i secs' % (sleep_time, )
+ print >> sys.stderr, 'Rate limit reached: sleeping for %i secs' % \
+ (sleep_time, )
time.sleep(sleep_time)
return 2
else:

0 comments on commit 87cbacd

Please sign in to comment.
Something went wrong with that request. Please try again.