Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
args = get_cli_arguments(add_arguments)
if not args.password:
print('Exit: password required.')
else:
fw = get_instance(FritzWLAN, args)
print_header(fw)
report_devices(fw, args)
def main():
args = get_cli_arguments(add_arguments)
if not args.password:
print('Exit: password required.')
return
fpb = get_instance(FritzPhonebook, args)
print_header(fpb)
print('FritzPhonebook:\n')
if args.all:
print_phonebooks(fpb)
elif args.name:
print_search_name(fpb, args)
elif args.number:
print_search_number(fpb, args)
print() # blank line for better readability
def run_inspector(inspector, args):
print_header(inspector.fc)
if args.services:
inspector.view_servicenames()
elif args.serviceactions:
inspector.view_actionnames(args.serviceactions[0])
elif args.servicearguments:
inspector.view_actionnames(args.servicearguments[0], view_arguments=True)
elif args.actionarguments:
inspector.view_actionarguments(args.actionarguments[0],
args.actionarguments[1])
elif args.complete:
inspector.view_complete_api()
elif args.reconnect:
inspector.fc.reconnect()
print('reconnect the router.')
print()
def main():
args = get_cli_arguments()
if not args.password:
print('Exit: password required.')
else:
fs = get_instance(FritzStatus, args)
print_header(fs)
print_status(fs)
def main():
arguments = get_cli_arguments(add_arguments)
if not arguments.password:
print('Exit: password required.')
return
fc = get_instance(FritzCall, arguments)
if arguments.call:
dial_number(fc, arguments.call)
else:
print_header(fc)
report_calls(fc, arguments)
def main():
args = get_cli_arguments()
if not args.password:
print('Exit: password required.')
else:
fh = get_instance(FritzHosts, args)
print_header(fh)
print_status(fh)