Beispiel #1
0
def read_balances():
    try:
        balances = storage.read(storage.key('system', "list:balances"))
    except:
        balances = {}

    return balances
Beispiel #2
0
def get_runlists():
    try:
        return json.dumps(storage.read(storage.key("system", "list:runlists")))
    except RuntimeError:
        return json.dumps([])
Beispiel #3
0
def exists(prefix, postfix):
    try:
        return str(storage.read(storage.key(prefix, postfix)))
    except:
        return 'Not exists', 404
Beispiel #4
0
def dict_remove(prefix, postfix, value):
    dict_key = storage.key(prefix, postfix)
    runlist_dict = storage.read(dict_key)
    runlist_dict.pop(value, None)
    storage.write(dict_key, runlist_dict)