(self)
| 212 | |
| 213 | |
| 214 | def saveCountFile(self): |
| 215 | filename = self.getCountFile() |
| 216 | tempcincount = {} |
| 217 | |
| 218 | if os.path.exists(filename) and not os.stat(filename).st_size == 0: |
| 219 | with open(filename, "r") as f: |
| 220 | tempcincount.update(json.load(f)) |
| 221 | |
| 222 | if not tempcincount == self.cincount: |
| 223 | try: |
| 224 | with open(filename, "w") as f: |
| 225 | js = json.dump(self.cincount, f, sort_keys=True, indent=4) |
| 226 | except Exception: |
| 227 | pass # FIXME: handle I/O errors? |
| 228 | |
| 229 | |
| 230 | def getCountDir(self): |
no test coverage detected