mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Allow for kwargs to be used in object initialization
This commit is contained in:
parent
0e760b59ba
commit
d06526c7a2
@ -23,13 +23,13 @@ class CaseInsensitiveDict(MutableMapping):
|
||||
Inspired by requests' case-insensitive dict implementation, but works with
|
||||
non-string keys as well.
|
||||
'''
|
||||
def __init__(self, init=None):
|
||||
def __init__(self, init=None, **kwargs):
|
||||
'''
|
||||
Force internal dict to be ordered to ensure a consistent iteration
|
||||
order, irrespective of case.
|
||||
'''
|
||||
self._data = OrderedDict()
|
||||
self.update(init or {})
|
||||
self.update(init or {}, **kwargs)
|
||||
|
||||
def __len__(self):
|
||||
return len(self._data)
|
||||
|
Loading…
Reference in New Issue
Block a user