Exemplo n.º 1
0
def counters(name,value=1):
	global slogin
	global flogin
	global saction
	global faction
	global clock
	mapping = {
		'login-t':  'slogin',
		'login-f':  'flogin',
		'action-t': 'saction',
		'action-f': 'faction',
	}
	with clock:
		globals()[mapping[name]] += value
		cli.show_status(slogin, flogin, saction, faction)
Exemplo n.º 2
0
def signal_handler(sig, frame):
    cli.debug_mode = 1
    cli.show_status(login_successful, login_failed, action_successful,
                    action_faild)