extra check for comment existence
This commit is contained in:
@@ -25,9 +25,10 @@ def get_comment_from_submission_txt(file_path: str) -> str | None:
|
|||||||
if not no_comment_regex_compile.findall(file_contents):
|
if not no_comment_regex_compile.findall(file_contents):
|
||||||
regular_expression = f'Comments:\n.*'
|
regular_expression = f'Comments:\n.*'
|
||||||
regex_compile = re.compile(regular_expression)
|
regex_compile = re.compile(regular_expression)
|
||||||
match = regex_compile.findall(file_contents)[0]
|
if regex_compile.findall(file_contents):
|
||||||
comment = match.split('\n')[1]
|
match = regex_compile.findall(file_contents)[0]
|
||||||
return comment
|
comment = match.split('\n')[1]
|
||||||
|
return comment
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user