File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -956,13 +956,14 @@ def init_tmp_with_template():
956
956
failure = str (e )
957
957
958
958
if not failure :
959
- with open (tmp_path , "rt" , encoding = "utf-8" ) as file :
960
- for line in file :
961
- if line .startswith (".. gh-issue:" ):
962
- issue_number = line .split (":" )[1 ].strip ()
963
- if issue_number .isdigit () and int (issue_number ) < 32426 :
964
- failure = "The gh-issue number should be 32426 or above."
965
- break
959
+ assert len (blurb ) # if parse_blurb succeeds, we should always have a body
960
+ if len (blurb ) > 1 :
961
+ failure = "Too many entries! Don't specify '..' on a line by itself."
962
+ gh_issue_number = blurb [0 ][0 ]["gh-issue" ]
963
+ if not gh_issue_number .isdigit ():
964
+ failure = "The gh-issue number must be a number."
965
+ if int (gh_issue_number ) < 32426 :
966
+ failure = "The gh-issue number should be 32426 or above."
966
967
967
968
if failure :
968
969
print ()
You can’t perform that action at this time.
0 commit comments