1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

beautify remove_quotes function

This commit is contained in:
Kelly Brazil
2023-01-05 16:55:53 -08:00
parent 7a93a61f54
commit 7cfe68b96a

View File

@ -93,15 +93,15 @@ __version__ = info.version
def _remove_quotes(value): def _remove_quotes(value):
if value is not None and value.startswith('"') and value.endswith('"'): if value is None:
value = value[1:-1]
elif value is not None and value.startswith("'") and value.endswith("'"):
value = value[1:-1]
elif value is None:
value = '' value = ''
elif value.startswith('"') and value.endswith('"'):
value = value[1:-1]
elif value.startswith("'") and value.endswith("'"):
value = value[1:-1]
return value return value