changeset 578:a18516692273

Correct my Redis API error in unit test.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 14:49:42 -0500
parents 4fb264b671d5
children 217a6319278c
files gpp/antispam/rate_limit.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/antispam/rate_limit.py	Sat May 05 14:18:56 2012 -0500
+++ b/gpp/antispam/rate_limit.py	Sat May 05 14:49:42 2012 -0500
@@ -62,7 +62,7 @@
     conn = _get_connection()
 
     try:
-        conn.setex(key, count, _to_seconds(interval))
+        conn.setex(key, time=_to_seconds(interval), value=count)
     except redis.RedisError, e:
         logger.error("rate limit (block_ip): %s" % e)
         raise RateLimiterUnavailable