From 01ea39b02a87e3bdaae2326d146aa9038815662b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 7 Jul 2011 00:07:07 +0200 Subject: [PATCH] race auth exception --- ox/web/auth.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ox/web/auth.py b/ox/web/auth.py index f4bb377..b43196a 100644 --- a/ox/web/auth.py +++ b/ox/web/auth.py @@ -5,7 +5,6 @@ import os from ox.utils import json - def get(key): user_auth = os.environ.get('oxAUTH', os.path.expanduser('~/.ox/auth.json')) auth = {} @@ -17,7 +16,7 @@ def get(key): if key in auth: return auth[key] print "please add key %s to json file '%s'" % (key, user_auth) - return "" + raise Exception,"no key %s found" % key def update(key, value): user_auth = os.environ.get('oxAUTH', os.path.expanduser('~/.ox/auth.json'))