ImprImproved code quality.
This commit is contained in:
parent
df96e08a68
commit
57ff95a588
|
@ -89,7 +89,7 @@ class KeypathDict(dict):
|
|||
else:
|
||||
try:
|
||||
super(KeypathDict, self).__delitem__(key)
|
||||
except KeyError as error:
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
def __getitem__(self, key):
|
||||
|
@ -100,7 +100,7 @@ class KeypathDict(dict):
|
|||
else:
|
||||
try:
|
||||
value = super(KeypathDict, self).__getitem__(key)
|
||||
except KeyError as error:
|
||||
except KeyError:
|
||||
value = None
|
||||
return value
|
||||
|
||||
|
|
|
@ -62,14 +62,14 @@ def parse_dict(val):
|
|||
if not isinstance(val, dict):
|
||||
val = None
|
||||
except Exception:
|
||||
pass
|
||||
# try:
|
||||
# val = yaml.safe_load(str_val)
|
||||
# except yaml.YAMLError as yaml_error:
|
||||
# except yaml.YAMLError:
|
||||
# try:
|
||||
# val = xmltodict.parse(str_val)
|
||||
# except Exception as xml_error:
|
||||
# except Exception:
|
||||
# pass
|
||||
pass
|
||||
return val
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue