@@ -245,16 +245,21 @@ def get_epilog():
245245 contests_part_one = None
246246 contests_part_two = None
247247
248- if not contests or len ( contests ) <= 1 :
248+ if contest_id :
249249 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."
253252 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' ]} "
258263
259264 if not problems :
260265 problem_part = 'For PROBLEM use the label as on the scoreboard.'
@@ -459,6 +464,8 @@ if args.url:
459464 baseurl = args .url
460465elif 'SUBMITBASEURL' in os .environ :
461466 baseurl = os .environ ['SUBMITBASEURL' ]
467+ logging .warning (f"Using '{ baseurl } ' as defined in the 'SUBMITBASEURL' environment variable. "
468+ + "Pass '-u <url>' to override." )
462469# Make sure that baseurl terminates with a '/' for later concatenation.
463470if baseurl and baseurl [- 1 :] != '/' :
464471 baseurl += '/'
@@ -467,6 +474,8 @@ if args.contest:
467474 contest_id = args .contest
468475elif 'SUBMITCONTEST' in os .environ :
469476 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." )
470479else :
471480 contest_id = ''
472481
0 commit comments