Delete the web console log file.
(self)
| 1332 | "version": 1, |
| 1333 | "total_points": 0, |
| 1334 | "level": 1, |
| 1335 | "mac_points": {}, |
| 1336 | "lifetime_counts": {} |
| 1337 | } |
| 1338 | |
| 1339 | loaded_data = {} |
| 1340 | if os.path.exists(self.gamification_file): |
| 1341 | try: |
| 1342 | with open(self.gamification_file, 'r', encoding='utf-8') as fp: |
| 1343 | raw_data = json.load(fp) |
| 1344 | if isinstance(raw_data, dict): |
| 1345 | loaded_data = raw_data |
| 1346 | except json.JSONDecodeError: |
| 1347 | logger.warning("Gamification file is corrupted; starting with defaults") |
| 1348 | except Exception as exc: |
| 1349 | logger.warning(f"Unable to load gamification file: {exc}") |
| 1350 | |
| 1351 | self.gamification_data = {**default_data, **loaded_data} |
no test coverage detected