Skip to content

Commit 3e919cd

Browse files
committed
Make timestamp accessible through whole troubleshoot process
- until now timestamp was accessible only after some conditions were met which resulted in occasional bug
1 parent c9bca89 commit 3e919cd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

troubleshoot/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
from gi.repository import Gtk
2424
import pprint
2525
import sys
26+
import datetime
27+
import time
2628
import traceback
2729

2830
if __name__ == "__main__":
@@ -102,7 +104,9 @@ def __init__ (self, quitfn=None, parent=None):
102104

103105
self.questions = []
104106
self.question_answers = []
105-
self.answers = {}
107+
# timestamp should be accessible through whole troubleshoot
108+
now = datetime.datetime.fromtimestamp (time.time ())
109+
self.answers = {'error_log_timestamp': now.strftime ("%F %T")}
106110
self.moving_backwards = False
107111

108112
main.show_all ()

0 commit comments

Comments
 (0)