(self)
| 597 | _exit(0) |
| 598 | |
| 599 | def shutdown(self): |
| 600 | self.log.info(_("shutting down...")) |
| 601 | try: |
| 602 | if self.config['webinterface']['activated'] and hasattr(self, "webserver"): |
| 603 | self.webserver.quit() |
| 604 | |
| 605 | for thread in self.threadManager.threads: |
| 606 | thread.put("quit") |
| 607 | pyfiles = self.files.cache.values() |
| 608 | |
| 609 | for pyfile in pyfiles: |
| 610 | pyfile.abortDownload() |
| 611 | |
| 612 | self.hookManager.coreExiting() |
| 613 | |
| 614 | except: |
| 615 | if self.debug: |
| 616 | print_exc() |
| 617 | self.log.info(_("error while shutting down")) |
| 618 | |
| 619 | finally: |
| 620 | self.files.syncSave() |
| 621 | self.shuttedDown = True |
| 622 | |
| 623 | self.deletePidFile() |
| 624 | |
| 625 | |
| 626 | def path(self, *args): |
no test coverage detected