(self)
| 667 | return False |
| 668 | |
| 669 | def clearLogs(self): |
| 670 | activeLogFiles = ['astrobox.log', 'serial.log', 'electron.log', 'touch.log'] |
| 671 | |
| 672 | logsDir = self._settings.getBaseFolder("logs") |
| 673 | |
| 674 | # first delete all old logs |
| 675 | for f in os.listdir(logsDir): |
| 676 | path = os.path.join(logsDir, f) |
| 677 | |
| 678 | if os.path.isfile(path) and f not in activeLogFiles: |
| 679 | os.unlink(path) |
| 680 | |
| 681 | # then truncate the currently used one |
| 682 | for f in activeLogFiles: |
| 683 | path = os.path.join(logsDir,f) |
| 684 | if os.path.isfile(path): |
| 685 | with open(path, 'w'): |
| 686 | pass |
| 687 | |
| 688 | return True |
| 689 | |
| 690 | @property |
| 691 | def systemInfo(self): |
nothing calls this directly
no test coverage detected