New option to skip max submission time test
This commit is contained in:
parent
3c44682cb8
commit
d1a3188ed4
1 changed files with 8 additions and 4 deletions
12
check.py
12
check.py
|
@ -205,6 +205,9 @@ if __name__ == '__main__':
|
||||||
parser.add_argument('--hard-max-submission', default="thursday 9:21",
|
parser.add_argument('--hard-max-submission', default="thursday 9:21",
|
||||||
help="allow submission until this hour")
|
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",
|
parser.add_argument('--submissions', default="/tmp/rendus",
|
||||||
help="directory where store submissions")
|
help="directory where store submissions")
|
||||||
|
|
||||||
|
@ -219,11 +222,12 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
with subprocess.Popen(["date", "-d", args.soft_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f:
|
if not args.skip_max_submission:
|
||||||
SOFT_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z")
|
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:
|
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")
|
HARD_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z")
|
||||||
|
|
||||||
ALTERNATE_RESOLUTIONS = args.alternate_resolutions
|
ALTERNATE_RESOLUTIONS = args.alternate_resolutions
|
||||||
SEND_TO_REALUSER = args.real_send
|
SEND_TO_REALUSER = args.real_send
|
||||||
|
|
Reference in a new issue