# HG changeset patch # User Andrey Skvortsov # Date 1508227741 -10800 # Node ID a347459df3a4c8639c97f8589c0ae4b8142e8663 # Parent e69d7e5aff003202aa2261163baaea9087fb882d fix displaying result of update check during Beremiz startup diff -r e69d7e5aff00 -r a347459df3a4 Beremiz.py --- a/Beremiz.py Tue Oct 17 09:51:43 2017 +0300 +++ b/Beremiz.py Tue Oct 17 11:09:01 2017 +0300 @@ -150,22 +150,21 @@ def CheckUpdates(self): if self.updateinfo_url is not None: - updateinfo = _("Fetching %s") % self.updateinfo_url + self.updateinfo = _("Fetching %s") % self.updateinfo_url def updateinfoproc(): - global updateinfo try: import urllib2 - updateinfo = urllib2.urlopen(self.updateinfo_url, None).read() + self.updateinfo = urllib2.urlopen(self.updateinfo_url, None).read() except Exception: - updateinfo = _("update info unavailable.") + self.updateinfo = _("update info unavailable.") from threading import Thread - self.splash.SetText(text=updateinfo) + self.splash.SetText(text=self.updateinfo) updateinfoThread = Thread(target=updateinfoproc) updateinfoThread.start() updateinfoThread.join(2) - self.splash.SetText(text=updateinfo) + self.splash.SetText(text=self.updateinfo) def ImportModules(self): global BeremizIDE