Example #1
0
File: ui.py Project: dodo5522/rpwc
def do_force_power_off():
    try:
        res = push_button(**button_params, interval=5)
    except (SerialException, ):
        res = (False, )

    if False in res:
        return json.dumps({"result": "Failed"})
    else:
        return json.dumps({"result": "OK"})
Example #2
0
def main():
    """ main routine.
    """
    kwargs = init_args()
    ret = push_button(**kwargs)