eric6/MicroPython/MicroPythonWidget.py

branch
micropython
changeset 7139
9bb36ec2d1b5
parent 7135
44fcfc99b864
child 7140
22f5fd76c10f
--- a/eric6/MicroPython/MicroPythonWidget.py	Thu Aug 15 17:04:54 2019 +0200
+++ b/eric6/MicroPython/MicroPythonWidget.py	Thu Aug 15 17:19:28 2019 +0200
@@ -1182,8 +1182,8 @@
                     self,
                     self.tr("Synchronize Time"),
                     self.tr("<p>The time of the connected device was"
-                            " synchronized with the local time.</p>")
-                    + self.__getDeviceTime()
+                            " synchronized with the local time.</p>") +
+                    self.__getDeviceTime()
                 )
         except Exception as exc:
             self.__showError("syncTime()", str(exc))
@@ -1200,7 +1200,7 @@
             dateTimeString = self.__interface.getTime()
             try:
                 date, time = dateTimeString.strip().split(None, 1)
-                msg = self.tr(
+                return self.tr(
                     "<h3>Device Date and Time</h3>"
                     "<table>"
                     "<tr><td><b>Date</b></td><td>{0}</td></tr>"
@@ -1208,11 +1208,10 @@
                     "</table>"
                 ).format(date, time)
             except ValueError:
-                msg = self.tr(
+                return self.tr(
                     "<h3>Device Date and Time</h3>"
                     "<p>{0}</p>"
                 ).format(dateTimeString.strip())
-            return msg
         except Exception as exc:
             self.__showError("getTime()", str(exc))
             return ""

eric ide

mercurial