()
| 425 | |
| 426 | |
| 427 | def main(): |
| 428 | |
| 429 | args = get_args() |
| 430 | |
| 431 | if args.version: |
| 432 | print(__version__) |
| 433 | |
| 434 | if args.debug: |
| 435 | logger.setLevel(logging.DEBUG) |
| 436 | |
| 437 | # create formatter |
| 438 | formatter = logging.Formatter( |
| 439 | '%(asctime)s - %(name)s - %(levelname)s - %(message)s') |
| 440 | |
| 441 | else: |
| 442 | logger.setLevel(logging.INFO) |
| 443 | |
| 444 | # create special formatter for info logs |
| 445 | formatter = logging.Formatter('%(message)s') |
| 446 | |
| 447 | # create console handler and set level to debug |
| 448 | ch = logging.StreamHandler(sys.stdout) |
| 449 | ch.setLevel(logging.DEBUG) |
| 450 | |
| 451 | # add formatter to ch |
| 452 | ch.setFormatter(formatter) |
| 453 | logger.addHandler(ch) |
| 454 | |
| 455 | if args.main_op == "build": |
| 456 | build(args) |
| 457 | |
| 458 | if args.main_op == "inspect": |
| 459 | inspect(args) |
| 460 | |
| 461 | if args.main_op == "report": |
| 462 | report(args) |
| 463 | |
| 464 | |
| 465 | if __name__ == '__main__': |
no test coverage detected