changeset 524:d9cf6f60b5a5

Fix for trying to redis.mget() and empty list of keys.
author Brian Neal <bgneal@gmail.com>
date Mon, 19 Dec 2011 00:05:03 +0000
parents e9c446a64423
children a053fbd3ac98
files gpp/forums/latest.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/forums/latest.py	Sun Dec 18 23:55:53 2011 +0000
+++ b/gpp/forums/latest.py	Mon Dec 19 00:05:03 2011 +0000
@@ -302,7 +302,7 @@
         result = conn.zrevrange(UPDATED_TOPICS_SET_KEY, 0, num - 1)
 
         topic_keys = [UPDATED_TOPIC_KEY % n for n in result]
-        json_list = conn.mget(topic_keys)
+        json_list = conn.mget(topic_keys) if topic_keys else []
 
     except redis.RedisError, e:
         logger.error(e)