fix displaying result of update check during Beremiz startup
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 17 Oct 2017 11:09:01 +0300
changeset 1874 a347459df3a4
parent 1873 e69d7e5aff00
child 1875 62aaabbf8812
fix displaying result of update check during Beremiz startup
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