(self)
| 3360 | ]) |
| 3361 | |
| 3362 | def run(self): |
| 3363 | if DEBUG_MODE: |
| 3364 | self.cbTS.debug.setStartTimer("LoadRCinTable") |
| 3365 | |
| 3366 | self.RCinTable.loading = True |
| 3367 | selCinFile = self.rcinFileList[self.cbTS.cfg.selRCinType] |
| 3368 | jsonPath = os.path.join(self.cbTS.jsondir, selCinFile) |
| 3369 | |
| 3370 | if self.RCinTable.cin is not None and hasattr(self.RCinTable.cin, '__del__'): |
| 3371 | self.RCinTable.cin.__del__() |
| 3372 | |
| 3373 | self.RCinTable.cin = None |
| 3374 | |
| 3375 | if os.path.exists(jsonPath): |
| 3376 | self.cbTS.RCinFileNotExist = False |
| 3377 | with io.open(jsonPath, 'r', encoding='utf8') as fs: |
| 3378 | self.RCinTable.cin = RCin(fs, self.cbTS.imeDirName) |
| 3379 | else: |
| 3380 | self.cbTS.RCinFileNotExist = True |
| 3381 | |
| 3382 | self.RCinTable.curCinType = self.cbTS.cfg.selRCinType |
| 3383 | self.RCinTable.loading = False |
| 3384 | |
| 3385 | if DEBUG_MODE: |
| 3386 | self.cbTS.debug.setEndTimer("LoadRCinTable") |
| 3387 | self.cbTS.debugLog[time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + " [R]"] = self.cbTS.debug.info['brand'] + ":「" + self.cbTS.debug.jsonNameDict[selCinFile] + "」反查碼表載入時間約為 " + self.cbTS.debug.getDurationTime("LoadRCinTable") + " 秒" |
| 3388 | |
| 3389 | |
| 3390 | class LoadHCinTable(threading.Thread): |
nothing calls this directly
no test coverage detected