ImprImproved code quality.

This commit is contained in:
Fabio Caccamo 2019-05-20 15:40:37 +02:00
parent df96e08a68
commit 57ff95a588
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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