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:
parent
2869ec8244
commit
621f87f6c5
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,10 @@ class TargetTagsDict(dict):
|
||||||
def __missing__(self, key):
|
def __missing__(self, key):
|
||||||
return key
|
return key
|
||||||
|
|
||||||
|
def get(self, key, default):
|
||||||
|
"""Normally, get() doesn't go trough __missing__"""
|
||||||
|
return self[key]
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
'simple-koji-ci.enabled': True,
|
'simple-koji-ci.enabled': True,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue