@@ -245,16 +245,21 @@ def get_epilog():
245
245
contests_part_one = None
246
246
contests_part_two = None
247
247
248
- if not contests or len ( contests ) <= 1 :
248
+ if contest_id :
249
249
contests_part_one = '''For CONTEST use the ID or short name as shown in the top-right contest
250
- drop-down box in the web interface.'''
251
- if contests and len (contests ) == 1 :
252
- contests_part_two = f"Currently this defaults to the only active contest '{ contests [0 ]['shortname' ]} '"
250
+ drop-down box in the web interface.'''
251
+ contests_part_two = f"Currently defaults to '{ contest_id } ', pass '-c <contest_id>' to override."
253
252
else :
254
- contests_part_one = 'For CONTEST use one of the following:'
255
- max_length = max ([len (c ['shortname' ]) for c in contests ])
256
- for contest in contests :
257
- contests_part_one += f"\n { contest ['shortname' ]:<{max_length }} - { contest ['name' ]} "
253
+ if not contests or len (contests ) <= 1 :
254
+ contests_part_one = '''For CONTEST use the ID or short name as shown in the top-right contest
255
+ drop-down box in the web interface.'''
256
+ if contests and len (contests ) == 1 :
257
+ contests_part_two = f"Currently this defaults to the only active contest '{ contests [0 ]['shortname' ]} '"
258
+ else :
259
+ contests_part_one = 'For CONTEST use one of the following:'
260
+ max_length = max ([len (c ['shortname' ]) for c in contests ])
261
+ for contest in contests :
262
+ contests_part_one += f"\n { contest ['shortname' ]:<{max_length }} - { contest ['name' ]} "
258
263
259
264
if not problems :
260
265
problem_part = 'For PROBLEM use the label as on the scoreboard.'
@@ -459,6 +464,8 @@ if args.url:
459
464
baseurl = args .url
460
465
elif 'SUBMITBASEURL' in os .environ :
461
466
baseurl = os .environ ['SUBMITBASEURL' ]
467
+ logging .warning (f"Using '{ baseurl } ' as defined in the 'SUBMITBASEURL' environment variable. "
468
+ + "Pass '-u <url>' to override." )
462
469
# Make sure that baseurl terminates with a '/' for later concatenation.
463
470
if baseurl and baseurl [- 1 :] != '/' :
464
471
baseurl += '/'
@@ -467,6 +474,8 @@ if args.contest:
467
474
contest_id = args .contest
468
475
elif 'SUBMITCONTEST' in os .environ :
469
476
contest_id = os .environ ['SUBMITCONTEST' ]
477
+ logging .warning (f"Using '{ contest_id } ' as defined in the 'SUBMITCONTEST' environment variable. "
478
+ + "Pass '-c <contest_id>' to override." )
470
479
else :
471
480
contest_id = ''
472
481
0 commit comments