aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2018-12-03 21:53:05 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2018-12-03 21:53:05 -0500
commit221fe109320b9e5e066cc20350f9f152e376a4a4 (patch)
tree7bad47607bce7fc98efde652534c98a2bc309508
parent76cebc9f26f98fb1f0977c73fde117c7460a87c9 (diff)
downloadkorg-helpers-221fe109320b9e5e066cc20350f9f152e376a4a4.tar.gz
Check before deleting patch from cache
Not sure how this is triggered -- I'd expect the patch_id to always be in that list. Pretty sure this is just a manifest of another bug. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-xgit-patchwork-bot.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-patchwork-bot.py b/git-patchwork-bot.py
index b8fbf22..4ff1f3b 100755
--- a/git-patchwork-bot.py
+++ b/git-patchwork-bot.py
@@ -187,7 +187,9 @@ class Restmaker:
def update_patch(self, patch_id, state=None, archived=False, commit_ref=None):
# Clear it out of the cache
- del self._patches[patch_id]
+ if patch_id in self._patches:
+ del self._patches[patch_id]
+
try:
logger.debug('Updating patch %d:', patch_id)
url = '/'.join((self.patches_url, str(patch_id), ''))