Browse Source

syntax labkeyDatabaseBrowser error

Andrej 7 months ago
parent
commit
975f2aa8ba
1 changed files with 4 additions and 4 deletions
  1. 4 4
      labkeyDatabaseBrowser.py

+ 4 - 4
labkeyDatabaseBrowser.py

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