sera/commands/addrevoke.py
def add(ctx, client_key):
    """add client public key to known clients"""
    if ctx.obj['local']:
        clients = get_allowed_clients(ctx.obj['known_clients'])
        if client_key not in clients:
            with ctx.obj['known_clients'].open(mode='w+') as file:
                file.writelines([client_key])
    else:
        remote('client', ctx)
add client public key to known clients
add client public key to known clients
add client public key to known clients
def add(ctx, client_key):
    if ctx.obj['local']:
        clients = get_allowed_clients(ctx.obj['known_clients'])
        if client_key not in clients:
            with ctx.obj['known_clients'].open(mode='w+') as file:
                file.writelines([client_key])
    else:
        remote('client', ctx)
def add ( ctx , client_key ) : if ctx . obj [ 'local' ] : clients = get_allowed_clients ( ctx . obj [ 'known_clients' ] ) if client_key not in clients : with ctx . obj [ 'known_clients' ] . open ( mode = 'w+' ) as file : file . writelines ( [ client_key ] ) else : remote ( 'client' , ctx )
add client public key to known clients
add client public key to known clients
"""add client public key to known clients"""
ctx
client_key