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.

Patch from Miro Hrončok provided at:
https://pagure.io/fedora-ci/simple-koji-ci/pull-request/37

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-02-24 10:42:36 +01:00
parent 2869ec8244
commit 621f87f6c5

View file

@ -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,