From ffa4ce3f1efffd5e3287cc20e25264f42e81ddaa Mon Sep 17 00:00:00 2001 From: Ori Kotek Date: Thu, 6 Jul 2023 19:22:55 +0300 Subject: [PATCH] Protect against no notifications received --- pr_agent/servers/github_polling.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pr_agent/servers/github_polling.py b/pr_agent/servers/github_polling.py index 9e9ae6fd..90aac6bf 100644 --- a/pr_agent/servers/github_polling.py +++ b/pr_agent/servers/github_polling.py @@ -55,6 +55,8 @@ async def polling_loop(): last_modified[0] = response.headers['Last-Modified'] since[0] = None notifications = await response.json() + if not notifications: + continue for notification in notifications: if 'id' in notification and notification['id'] in handled_ids: continue