diff options
Diffstat (limited to 'monitor')
| -rwxr-xr-x | monitor/josef_monitor.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py index 14a280a..4b8b721 100755 --- a/monitor/josef_monitor.py +++ b/monitor/josef_monitor.py @@ -338,6 +338,7 @@ def main(args): if os.path.isfile(log.savefile): log.load() # Build what was not loaded + # try: for log in logs: log.incremental_build() @@ -353,16 +354,18 @@ def main(args): log.verify_consistency(old_sth) log.incremental_build() - # Unreachable... usually. - for log in logs: - log.save() - except KeyboardInterrupt: print time.strftime('%H:%M:%S') + ' Received interrupt from user. Saving and exiting....' for log in logs: log.save() + except: + # Unreachable... usually. + print "FATAL ERROR! Saving state and terminating!" + for log in logs: + log.save() + if __name__ == '__main__': |
