diff options
Diffstat (limited to 'tools/patman/main.py')
-rwxr-xr-x | tools/patman/main.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/patman/main.py b/tools/patman/main.py index d1a43c44fc..7f4ae1125a 100755 --- a/tools/patman/main.py +++ b/tools/patman/main.py @@ -90,6 +90,10 @@ test_parser.add_argument('testname', type=str, default=None, nargs='?', help="Specify the test to run") AddCommonArgs(test_parser) +status = subparsers.add_parser('status', + help='Check status of patches in patchwork') +AddCommonArgs(status) + # Parse options twice: first to get the project and second to handle # defaults properly (which depends on project). argv = sys.argv[1:] @@ -157,3 +161,17 @@ elif args.cmd == 'send': else: control.send(args) + +# Check status of patches in patchwork +elif args.cmd == 'status': + ret_code = 0 + try: + control.patchwork_status(args.branch, args.count, args.start, args.end) + except Exception as e: + terminal.Print('patman: %s: %s' % (type(e).__name__, e), + colour=terminal.Color.RED) + if args.debug: + print() + traceback.print_exc() + ret_code = 1 + sys.exit(ret_code) |