race auth exception
This commit is contained in:
parent
79b1c7ed85
commit
01ea39b02a
1 changed files with 1 additions and 2 deletions
|
@ -5,7 +5,6 @@ import os
|
||||||
|
|
||||||
from ox.utils import json
|
from ox.utils import json
|
||||||
|
|
||||||
|
|
||||||
def get(key):
|
def get(key):
|
||||||
user_auth = os.environ.get('oxAUTH', os.path.expanduser('~/.ox/auth.json'))
|
user_auth = os.environ.get('oxAUTH', os.path.expanduser('~/.ox/auth.json'))
|
||||||
auth = {}
|
auth = {}
|
||||||
|
@ -17,7 +16,7 @@ def get(key):
|
||||||
if key in auth:
|
if key in auth:
|
||||||
return auth[key]
|
return auth[key]
|
||||||
print "please add key %s to json file '%s'" % (key, user_auth)
|
print "please add key %s to json file '%s'" % (key, user_auth)
|
||||||
return ""
|
raise Exception,"no key %s found" % key
|
||||||
|
|
||||||
def update(key, value):
|
def update(key, value):
|
||||||
user_auth = os.environ.get('oxAUTH', os.path.expanduser('~/.ox/auth.json'))
|
user_auth = os.environ.get('oxAUTH', os.path.expanduser('~/.ox/auth.json'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue