Commits

Yuya Nishihara  committed c449bb5

serve: unroll silly inner function of status message

  • Participants
  • Parent commits 7649292

Comments (0)

Files changed (1)

File tortoisehg/hgqt/serve.py

         self._webconf_form.setEnabled(not self.isstarted())
 
     def _updatestatus(self):
-        def statustext():
-            if self.isstarted():
-                # TODO: escape special chars
-                link = '<a href="%s">%s</a>' % (self.rooturl, self.rooturl)
-                return _('Running at %s') % link
-            else:
-                return _('Stopped')
+        if self.isstarted():
+            # TODO: escape special chars
+            link = '<a href="%s">%s</a>' % (self.rooturl, self.rooturl)
+            msg = _('Running at %s') % link
+        else:
+            msg = _('Stopped')
 
-        self._qui.status_edit.setText(statustext())
+        self._qui.status_edit.setText(msg)
 
     @pyqtSlot()
     def start(self):