From 2172c64070bac3eb4ce6988e4b062c16c24fdd4d Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sun, 18 Nov 2012 21:07:20 -0800 Subject: [PATCH] show very slightly nicer error for bad payments --- server-ca/payment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server-ca/payment.py b/server-ca/payment.py index f500f09f7..767afed24 100755 --- a/server-ca/payment.py +++ b/server-ca/payment.py @@ -30,11 +30,11 @@ class payment(object): def GET(self, session): web.header("Content-type", "text/html") if len(session) != 64 or not all(hexdigit(s) for s in session): - return "Attempt to process payment for invalid session." + return "

Oops!

Attempt to process payment for invalid session." if session not in r or r.hget(session, "live") != "True": - return "Attempt to process payment for invalid session." + return "

Oops!

Attempt to process payment for invalid session." if r.hget(session, "state") != "payment": - return "Attempt to process payment for session not expecting it." + return "

Oops!

Attempt to process payment for session that was not expecting it." r.publish("payments", session) names = r.lrange("%s:names" % session, 0, -1) names_list = ''