From e0db3556d0551e759f1937bd8ba1ed6a39b52f8d Mon Sep 17 00:00:00 2001 From: Olek Bojda Date: Thu, 27 Sep 2018 11:50:25 +0200 Subject: [PATCH] Fixed strings formatting for master plugin --- safety_master_plugin/scripts/qt_master_wrapper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/safety_master_plugin/scripts/qt_master_wrapper.py b/safety_master_plugin/scripts/qt_master_wrapper.py index c1da1b2..19b22de 100644 --- a/safety_master_plugin/scripts/qt_master_wrapper.py +++ b/safety_master_plugin/scripts/qt_master_wrapper.py @@ -211,7 +211,8 @@ class QtWrapper: cursor = self.widget.logsBrowser.textCursor() cursor.movePosition(QTextCursor.End) self.widget.logsBrowser.setTextCursor(cursor) - self.widget.logsBrowser.insertHtml('' + str(time) + '. ' + info_text + '
') + # self.widget.logsBrowser.insertHtml('' + str(time) + '. ' + info_text + '
') + self.widget.logsBrowser.insertHtml(' {0} {1}
'.format(time,info_text)) self.scroll_to_bottom() def log_warning(self,warning_text): @@ -221,7 +222,7 @@ class QtWrapper: cursor.movePosition(QTextCursor.End) self.widget.logsBrowser.setTextCursor(cursor) self.widget.logsBrowser.textCursor().movePosition(QTextCursor.End) - self.widget.logsBrowser.insertHtml('' + str(time) + '. ' + warning_text + '
') + self.widget.logsBrowser.insertHtml(' {0} {1}
'.format(time,warning_text)) self.scroll_to_bottom() def log_error(self,error_text): @@ -231,7 +232,7 @@ class QtWrapper: cursor.movePosition(QTextCursor.End) self.widget.logsBrowser.setTextCursor(cursor) self.widget.logsBrowser.textCursor().movePosition(QTextCursor.End) - self.widget.logsBrowser.insertHtml('' + str(time) + '. ' + error_text + '
') + self.widget.logsBrowser.insertHtml(' {0} {1}
'.format(time,error_text)) self.scroll_to_bottom() def scroll_to_bottom(self):