extra check for comment existence

This commit is contained in:
2023-12-08 14:02:44 +00:00
parent f011cdcda0
commit 196e215133

View File

@@ -25,6 +25,7 @@ def get_comment_from_submission_txt(file_path: str) -> str | None:
if not no_comment_regex_compile.findall(file_contents):
regular_expression = f'Comments:\n.*'
regex_compile = re.compile(regular_expression)
if regex_compile.findall(file_contents):
match = regex_compile.findall(file_contents)[0]
comment = match.split('\n')[1]
return comment