mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Allow for kwargs to be used in object initialization
This commit is contained in:
parent
2bf93fd9af
commit
c84be3fb4f
1 changed files with 2 additions and 2 deletions
|
@ -38,13 +38,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…
Add table
Reference in a new issue