update
This commit is contained in:
parent
d20d64204a
commit
46ef3d4d0a
@ -64,7 +64,10 @@ class MyHandler(FileSystemEventHandler):
|
||||
room.position = os.path.getsize(event.src_path)
|
||||
|
||||
for line in f:
|
||||
data = json.loads(line)
|
||||
try:
|
||||
data = json.loads(line)
|
||||
except json.decoder.JSONDecodeError:
|
||||
continue
|
||||
self._handle_data(room, data)
|
||||
|
||||
self._check_room_state_change(room)
|
||||
@ -81,7 +84,10 @@ class MyHandler(FileSystemEventHandler):
|
||||
|
||||
with open(event.src_path, "r", encoding="utf-8") as f:
|
||||
for line in f:
|
||||
data = json.loads(line)
|
||||
try:
|
||||
data = json.loads(line)
|
||||
except json.decoder.JSONDecodeError:
|
||||
continue
|
||||
self._handle_data(data)
|
||||
|
||||
self._check_room_state_change(room)
|
||||
|
Loading…
Reference in New Issue
Block a user