def fetch(bank, key):
    '''
    Fetch a key value.
    '''
    _init_client()
    query = "SELECT data FROM {0} WHERE bank='{1}' AND etcd_key='{2}'".format(
        _table_name, bank, key)
    cur, _ = run_query(client, query)
    r = cur.fetchone()
    cur.close()
    if r is None:
        return {}
    return __context__['serial'].loads(r[0])
def fetch ( bank , key ) : _init_client ( ) query = "SELECT data FROM {0} WHERE bank='{1}' AND etcd_key='{2}'" . format ( _table_name , bank , key ) cur , _ = run_query ( client , query ) r = cur . fetchone ( ) cur . close ( ) if r is None : return { } return __context__ [ 'serial' ] . loads ( r [ 0 ] )
Fetch a key value.