Skip to content
Browse files

adding louder debugging

  • Loading branch information...
1 parent a39bc5b commit 01bb354853f23c2d2b8f92549f69065ed9ab6abf @peterbe committed Nov 12, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 handlers.py
View
5 handlers.py
@@ -900,7 +900,10 @@ def get(self):
self.redis.setex(key, username, 7 * 24 * 60 * 60)
screen_names.append(username)
- assert len(result) == len(screen_names)
+ if len(result) != len(screen_names):
+ logging.error('RESULT (%d): %r' % (len(result), result))
+ logging.error('SCREEN_NAMES (%d): %r' % (len(screen_names), screen_names))
+ raise ValueError('Invalid number of results')
screen_names.sort()
self.write_json(screen_names)

0 comments on commit 01bb354

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