Permalink
Browse files

using redirect exception... maybe

  • Loading branch information...
1 parent baf20a1 commit f1cfd1ddd0423b394bd3e624d151def7b8179f6d @progrium progrium committed Jan 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 keymaster.py
View
@@ -60,7 +60,7 @@ def encrypt(cls, key_name, secret):
def decrypt(cls, key_name):
k = cls.get_by_key_name(str(key_name))
if k is None:
- raise Exception("Keymaster has no secret for %s" % key_name)
+ raise RedirectException('/_km/key/%s' % key_name, "Keymaster has no secret for %s" % key_name)
return ARC4.new(os.environ['APPLICATION_ID']).encrypt(k.secret)
def get(key):

0 comments on commit f1cfd1d

Please sign in to comment.