def main(prog_name=os.path.basename(sys.argv[0]), args=sys.argv[1:], with_loggers=True): parser = create_parser(prog_name) args = parser.parse_args(args) if with_loggers is True: if args.verbose is None: verbose_level = 0 else: verbose_level = args.verbose setup_loggers(verbose_level=verbose_level) if args.command == 'keygen': do_keygen(args) elif args.command == 'cluster': do_cluster(args) elif args.command == 'docker': do_docker(args) elif args.command == 'submit': do_submit(args) elif args.command == 'block': do_block(args) elif args.command == 'transaction': do_transaction(args) elif args.command == 'store': do_store(args) elif args.command == 'admin': do_admin(args) elif args.command == 'stats': do_stats(args) elif args.command == 'monitor': do_monitor(args) else: raise CliException("invalid command: {}".format(args.command))
def main(prog_name=os.path.basename(sys.argv[0]), args=sys.argv[1:]): parser = create_parser(prog_name) args = parser.parse_args(args) if args.verbose is None: verbose_level = 0 else: verbose_level = args.verbose setup_loggers(verbose_level=verbose_level) if args.command == 'keygen': do_keygen(args) elif args.command == 'docker': do_docker(args) elif args.command == 'submit': do_submit(args) elif args.command == 'block': do_block(args) elif args.command == 'transaction': do_transaction(args) elif args.command == 'store': do_store(args) elif args.command == 'genesis': do_genesis(args) else: raise CliException("invalid command: {}".format(args.command))