(path, progress)
| 76 | pyfalog.debug("Starting backup fits thread.") |
| 77 | |
| 78 | def backupFitsWorkerFunc(path, progress): |
| 79 | try: |
| 80 | backedUpFits = Port.exportXml(svcFit.getInstance().getAllFits(), progress) |
| 81 | if backedUpFits: |
| 82 | progress.message = f'writing {path}' |
| 83 | backupFile = open(path, "w", encoding="utf-8") |
| 84 | backupFile.write(backedUpFits) |
| 85 | backupFile.close() |
| 86 | except (KeyboardInterrupt, SystemExit): |
| 87 | raise |
| 88 | except Exception as e: |
| 89 | progress.error = f'{e}' |
| 90 | finally: |
| 91 | progress.current += 1 |
| 92 | progress.workerWorking = False |
| 93 | |
| 94 | threading.Thread( |
| 95 | target=backupFitsWorkerFunc, |
nothing calls this directly
no test coverage detected