@@ -506,7 +506,7 @@ elif contests:
506506languages : list = []
507507problems : list = []
508508if my_contest and baseurl :
509- if 'allow_submit' in my_contest and not my_contest ['allow_submit' ]:
509+ if not args . print and 'allow_submit' in my_contest and not my_contest ['allow_submit' ]:
510510 warn_user ('Submissions for contest (temporarily) disabled' )
511511 exit (1 )
512512 languages = read_languages ()
@@ -610,23 +610,25 @@ for problem in problems:
610610if not my_problem and not args .print :
611611 usage ('No known problem specified or detected.' )
612612
613- # Guess entry point if not already specified.
614- if not entry_point and my_language ['entry_point_required' ]:
615- if my_language ['name' ] == 'Java' :
616- entry_point = filebase
617- elif my_language ['name' ] == 'Kotlin' :
618- entry_point = kotlin_base_entry_point (filebase ) + "Kt"
619- elif my_language ['name' ] == 'Python 3' :
620- entry_point = filebase + "." + ext
621-
622- if not entry_point and my_language ['entry_point_required' ]:
623- error ('Entry point required but not specified nor detected.' )
613+ if not args .print :
614+ # Guess entry point if not already specified.
615+ if not entry_point and my_language ['entry_point_required' ]:
616+ if my_language ['name' ] == 'Java' :
617+ entry_point = filebase
618+ elif my_language ['name' ] == 'Kotlin' :
619+ entry_point = kotlin_base_entry_point (filebase ) + "Kt"
620+ elif my_language ['name' ] == 'Python 3' :
621+ entry_point = filebase + "." + ext
622+
623+ if not entry_point and my_language ['entry_point_required' ]:
624+ error ('Entry point required but not specified nor detected.' )
624625
625626logging .debug (f"contest is `{ my_contest ['shortname' ]} '" )
626627if not args .print :
627628 logging .debug (f"problem is `{ my_problem ['label' ]} '" )
628- logging .debug (f"language is `{ my_language ['name' ]} '" )
629- logging .debug (f"entry_point is `{ entry_point or '<None>' } '" )
629+ logging .debug (f"language is `{ my_language .get ('name' , '<None>' )} '" )
630+ if not args .print :
631+ logging .debug (f"entry_point is `{ entry_point or '<None>' } '" )
630632logging .debug (f"url is `{ baseurl } '" )
631633
632634if args .print :
0 commit comments