瀏覽代碼

syntax labkeyDatabaseBrowser error

Andrej 7 月之前
父節點
當前提交
975f2aa8ba
共有 1 個文件被更改,包括 4 次插入4 次删除
  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