148 AddBitmapFolder(os.path.join(extension_folder, "images")) |
148 AddBitmapFolder(os.path.join(extension_folder, "images")) |
149 execfile(extfilename, locals()) |
149 execfile(extfilename, locals()) |
150 |
150 |
151 def CheckUpdates(self): |
151 def CheckUpdates(self): |
152 if self.updateinfo_url is not None: |
152 if self.updateinfo_url is not None: |
153 updateinfo = _("Fetching %s") % self.updateinfo_url |
153 self.updateinfo = _("Fetching %s") % self.updateinfo_url |
154 |
154 |
155 def updateinfoproc(): |
155 def updateinfoproc(): |
156 global updateinfo |
|
157 try: |
156 try: |
158 import urllib2 |
157 import urllib2 |
159 updateinfo = urllib2.urlopen(self.updateinfo_url, None).read() |
158 self.updateinfo = urllib2.urlopen(self.updateinfo_url, None).read() |
160 except Exception: |
159 except Exception: |
161 updateinfo = _("update info unavailable.") |
160 self.updateinfo = _("update info unavailable.") |
162 |
161 |
163 from threading import Thread |
162 from threading import Thread |
164 self.splash.SetText(text=updateinfo) |
163 self.splash.SetText(text=self.updateinfo) |
165 updateinfoThread = Thread(target=updateinfoproc) |
164 updateinfoThread = Thread(target=updateinfoproc) |
166 updateinfoThread.start() |
165 updateinfoThread.start() |
167 updateinfoThread.join(2) |
166 updateinfoThread.join(2) |
168 self.splash.SetText(text=updateinfo) |
167 self.splash.SetText(text=self.updateinfo) |
169 |
168 |
170 def ImportModules(self): |
169 def ImportModules(self): |
171 global BeremizIDE |
170 global BeremizIDE |
172 import BeremizIDE |
171 import BeremizIDE |
173 |
172 |