Skip to content

Commit 3bbff60

Browse files
author
Rafael Sierra
committed
Added call to decode data from Consul
On Python 3, consul call to `kv.get` returns a bytes type, calling `.decode()` will turn that into a str object
1 parent 4d861e1 commit 3bbff60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

decouple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def __contains__(self, key):
137137
if not data:
138138
return False
139139
else:
140-
self.data[key] = data.get('Value', None)
140+
self.data[key] = data.get('Value', None).decode()
141141
return True
142142

143143
def __getitem__(self, key):

0 commit comments

Comments
 (0)