mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 17:57:59 +00:00
PropDict: fail early if internal_dict is not a dict
This commit is contained in:
parent
122dfce405
commit
0e1cf2056b
1 changed files with 6 additions and 2 deletions
|
@ -43,11 +43,15 @@ class PropDict:
|
|||
if data_dict is None:
|
||||
data = kw
|
||||
elif not isinstance(data_dict, dict):
|
||||
raise TypeError("data_dict must be dict")
|
||||
raise TypeError("data_dict must be a dict")
|
||||
else:
|
||||
data = data_dict
|
||||
if internal_dict is None:
|
||||
internal_dict = {}
|
||||
elif not isinstance(internal_dict, dict):
|
||||
raise TypeError("internal_dict must be a dict")
|
||||
self._dict = {}
|
||||
self.update_internal(internal_dict or {})
|
||||
self.update_internal(internal_dict)
|
||||
self.update(data)
|
||||
|
||||
def update(self, d):
|
||||
|
|
Loading…
Reference in a new issue