removed unnecessary encoding

This commit is contained in:
Erin O'Connell
2017-11-18 23:18:48 -07:00
parent 0bf74bf4c6
commit 0a5e5dab48
+1 -3
View File
@@ -102,13 +102,11 @@ def parse_dotenv(dotenv_path):
if not line or line.startswith('#') or '=' not in line:
continue
k, v = line.split('=', 1)
# Remove any leading and trailing spaces in key, value
k, v = k.strip(), v.strip().encode('unicode-escape').decode('ascii')
k, v = k.strip(), v.strip()
if len(v) > 0:
quoted = v[0] == v[len(v) - 1] in ['"', "'"]
if quoted:
v = decode_escaped(v[1:-1])