Skip to content

Commit

Permalink
Fix configure output regex pattern (TriBITSPub#600)
Browse files Browse the repository at this point in the history
Fix regex pattern to match a string literal rather than
a raw json string output which was used prior for during testing.
  • Loading branch information
achauphan committed Jan 29, 2024
1 parent acc3934 commit d86767f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ def getDateRangeTuple(referenceDateTime, dayTimeDelta):


def getTopicTargetSha1s(buildConfigOutput):
pattern = r"Parent [12]:\\n\s+(\w+)"
matchedList = regex.findall(pattern, str(buildConfigOutput))
pattern = r"Parent [12]:\n\s+(\w+)"
matchedList = regex.findall(pattern, buildConfigOutput)

if len(matchedList) != 2: return None
return tuple(matchedList)

Expand Down

0 comments on commit d86767f

Please sign in to comment.