Ver código fonte

syntax labkeyDatabaseBrowser error

Andrej 7 meses atrás
pai
commit
975f2aa8ba
1 arquivos alterados com 4 adições e 4 exclusões
  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