|
@@ -82,10 +82,10 @@ class labkeyDB:
|
|
|
#try with a set of encodings to maximize probability of success
|
|
|
encodings=[encoding,'utf_8']
|
|
|
for x in encodings:
|
|
|
- try:
|
|
|
- return json.loads(response.data.decode(x))
|
|
|
- except UnicodeDecodeError:
|
|
|
- print(f'Failed to decode with [{x}]: {data}')
|
|
|
+ try:
|
|
|
+ return json.loads(response.data.decode(x))
|
|
|
+ except UnicodeDecodeError:
|
|
|
+ print(f'Failed to decode with [{x}]: {data}')
|
|
|
return None
|
|
|
|
|
|
|