Skip to content

Commit fd5be5f

Browse files
committed
Allow putting nocfbot at the start of a patch file
1 parent 646d18f commit fd5be5f

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

cfbot_commitfest_rpc.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,15 @@ def get_latest_patches_from_thread_url(thread_url):
4444
'<a href="(/message-id/attachment/[^"]*\\.(diff|diff\\.gz|patch|patch\\.gz|tar\\.gz|tgz|tar\\.bz2|zip))">',
4545
line,
4646
)
47-
if groups and not groups.group(1).endswith("subtrans-benchmark.tar.gz"):
48-
message_attachments.append("https://www.postgresql.org" + groups.group(1))
49-
selected_message_attachments = message_attachments
50-
selected_message_id = message_id
47+
if groups and not groups.group(1):
48+
attachment = groups.group(1)
49+
if "/nocfbot" not in attachment and not attachment.endswith(
50+
"subtrans-benchmark.tar.gz"
51+
):
52+
message_attachments.append("https://www.postgresql.org" + attachment)
53+
selected_message_attachments = message_attachments
54+
selected_message_id = message_id
55+
5156
# groups = re.search('<a name="([^"]+)"></a>', line)
5257
groups = re.search('<td><a href="/message-id/[^"]+">([^"]+)</a></td>', line)
5358
if groups:

0 commit comments

Comments
 (0)