зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1506132 - Only __getitem__() in dicts that include the desired key to avoid printing tracebacks r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D12998 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7d7e997a07
Коммит
43e4c14643
|
@ -577,7 +577,10 @@ class MultiDict(dict):
|
|||
|
||||
:param key: The key to lookup
|
||||
"""
|
||||
return dict.__getitem__(self, key)
|
||||
if key in self:
|
||||
return dict.__getitem__(self, key)
|
||||
else:
|
||||
return []
|
||||
|
||||
@classmethod
|
||||
def from_field_storage(cls, fs):
|
||||
|
|
Загрузка…
Ссылка в новой задаче