diff --git a/mpcdf_push.py b/mpcdf_push.py index c79dd82593d753194fc5d61c256238b765277217..6b3fb67dd023a91c3cd9e66c754c3cc84064f833 100644 --- a/mpcdf_push.py +++ b/mpcdf_push.py @@ -85,11 +85,10 @@ def do_mpcdf_push(self, subcmd, opts, *args): print("Submitted package {0} to {1} in request {2}".format(package, to_project, req_id)) if not opts.batch: print("\nPLEASE review the request by 'osc request show {0} --diff', or in the web interface\n".format(req_id)) - print("Do you want to accept the request right away? [y/N] ", end="") - response = input().lower() - if response == "y": - result = osc.core.change_request_state(api_url, req_id, 'accepted', "Accepted on the command line via 'osc mpcdf_push'") - print(" Accepting request {0}:".format(req_id), result) + print("Press Ctrl-C to abort, any key to continue", end="") + input() + result = osc.core.change_request_state(api_url, req_id, 'accepted', "Accepted on the command line via 'osc mpcdf_push'") + print(" Accepting request {0}:".format(req_id), result) user = osc.conf.get_apiurl_usr(api_url) if user not in existing_maintainers: @@ -98,9 +97,8 @@ def do_mpcdf_push(self, subcmd, opts, *args): r.add_action("add_role", tgt_project=to_project, tgt_package=package, person_name=user, person_role="maintainer") r.description = "Add user {0} as maintainer due to 'osc mpcdf_push'".format(user) r.create(api_url) - if response == "y": - result = osc.core.change_request_state(api_url, r.reqid, 'accepted', "Accepted on the command line via 'osc mpcdf_push'") - print(" Accepting request {0}:".format(r.reqid), result) + result = osc.core.change_request_state(api_url, r.reqid, 'accepted', "Accepted on the command line via 'osc mpcdf_push'") + print(" Accepting request {0}:".format(r.reqid), result) print() # Give the system some time, sadly there is no transactional guarantee