toninio19 commited on
Commit
b86ade6
·
verified ·
1 Parent(s): 68c716c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -69,7 +69,7 @@ class VideoArenaManager:
69
  with open(self.data_file, "w") as f:
70
  json.dump(data, f, indent=2)
71
  return data
72
- except Timeout:
73
  print(f"Could not acquire lock on {self.data_file}")
74
  # Handle timeout (e.g., return default data or raise an error)
75
  default_rating = 1000.0
 
69
  with open(self.data_file, "w") as f:
70
  json.dump(data, f, indent=2)
71
  return data
72
+ except (Timeout, KeyError):
73
  print(f"Could not acquire lock on {self.data_file}")
74
  # Handle timeout (e.g., return default data or raise an error)
75
  default_rating = 1000.0