(self)
| 599 | self._updater = None |
| 600 | |
| 601 | def restartServer(self): |
| 602 | if platformStr == "linux" or platformStr == "linux2": |
| 603 | actions = self._settings.get(["system", "actions"]) |
| 604 | for a in actions: |
| 605 | if a['action'] == 'reboot': |
| 606 | #Call to Popen will start the restart command but return inmediately before it completes |
| 607 | threading.Timer(1.0, subprocess.Popen, [a['command'].split(' ')]).start() |
| 608 | self._logger.info('Restart command scheduled') |
| 609 | |
| 610 | from astroprint.printer.manager import printerManager |
| 611 | from astroprint.camera import cameraManager |
| 612 | from astroprint.network.manager import networkManagerShutdown |
| 613 | |
| 614 | #let's be nice about shutthing things down |
| 615 | printerManager().disconnect() |
| 616 | cameraManager().close_camera() |
| 617 | networkManagerShutdown() |
| 618 | |
| 619 | return True |
| 620 | |
| 621 | return False |
| 622 | |
| 623 | return True |
| 624 | |
| 625 | def sendLogs(self, ticketNo=None, message=None): |
| 626 | import zipfile |
nothing calls this directly
no test coverage detected