diff --git a/check.py b/check.py index 35bd43a..5a0b92d 100755 --- a/check.py +++ b/check.py @@ -205,6 +205,9 @@ if __name__ == '__main__': parser.add_argument('--hard-max-submission', default="thursday 9:21", help="allow submission until this hour") + parser.add_argument('--skip-max-submission', action="store_true", + help="skip submission date check") + parser.add_argument('--submissions', default="/tmp/rendus", help="directory where store submissions") @@ -219,11 +222,12 @@ if __name__ == '__main__': args = parser.parse_args() - with subprocess.Popen(["date", "-d", args.soft_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f: - SOFT_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z") + if not args.skip_max_submission: + with subprocess.Popen(["date", "-d", args.soft_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f: + SOFT_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z") - with subprocess.Popen(["date", "-d", args.hard_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f: - HARD_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z") + with subprocess.Popen(["date", "-d", args.hard_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f: + HARD_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z") ALTERNATE_RESOLUTIONS = args.alternate_resolutions SEND_TO_REALUSER = args.real_send