()
| 418 | |
| 419 | |
| 420 | def main(): |
| 421 | parser = MarvinCliParser() |
| 422 | parser.add_option("-v", "--version", |
| 423 | action="store_true", dest="version", default=False, |
| 424 | help="prints marvin cli version information") |
| 425 | (options, args) = parser.parse_args() |
| 426 | if options.version: |
| 427 | MarvinCliHelp.help_printversion() |
| 428 | sys.exit(0) |
| 429 | if len(sys.argv) > 1: |
| 430 | if sys.argv[1].lower() not in list(MarvinCliCommands.cmds_info.keys()): |
| 431 | print("\n==== Invalid Command ====") |
| 432 | sys.exit(1) |
| 433 | args = ' '.join(args) |
| 434 | if '-h' in args or '--help' in args: |
| 435 | print(MarvinCliCommands.cmds_info[sys.argv[0]]) |
| 436 | else: |
| 437 | MarvinCli().onecmd(args) |
| 438 | sys.exit(0) |
| 439 | |
| 440 | if __name__ == "__main__": |
| 441 | main() |
no test coverage detected