From a1630f0288e399c365f9cdd7b7703f3de4c2483d Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Feb 24 2020 08:50:44 +0000 Subject: Redefine TargetTagsDict.get() to always use __missing__ The code uses `target_tags.get(branch, 'rawhide')` and dict.get() doesn't use __missing__, only dict[key] access does. This fixes up 8642f188adbb31a02021334e2016772d12c8e093. Signed-off-by: Everybody Likes This --- diff --git a/fedmsg.d/simple-koji-ci-example.py b/fedmsg.d/simple-koji-ci-example.py index a72c63a..ea1ccc9 100644 --- a/fedmsg.d/simple-koji-ci-example.py +++ b/fedmsg.d/simple-koji-ci-example.py @@ -3,6 +3,10 @@ class TargetTagsDict(dict): def __missing__(self, key): return key + def get(self, key, default): + """Normally, get() doesn't go trough __missing__""" + return self[key] + config = { 'simple-koji-ci.enabled': True,