this is a simple key, not a hash

This commit is contained in:
Seth Schoen 2012-11-18 16:47:58 -08:00
parent 647abf8e3c
commit 8e4e2af1fa

View file

@ -95,7 +95,7 @@ def testchallenge(session):
# Try to get a unique abbreviated ID (10 hex digits)
for i in xrange(20):
abbreviation = random()[:10]
if r.hget("shorturl-%s" % abbreviation) is None:
if r.get("shorturl-%s" % abbreviation) is None:
break
else:
# Mysteriously unable to get a unique abbreviated session ID!