mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
qt update checker: handle --offline
This commit is contained in:
parent
68cd37282e
commit
6926b8b2d4
1 changed files with 11 additions and 4 deletions
|
@ -936,11 +936,18 @@ class UpdateCheckThread(QThread, PrintError):
|
||||||
return StrictVersion(version_num.strip())
|
return StrictVersion(version_num.strip())
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
network = self.main_window.network
|
||||||
self.checked.emit(asyncio.run_coroutine_threadsafe(self.get_update_info(), self.main_window.network.asyncio_loop).result())
|
if not network:
|
||||||
except Exception:
|
|
||||||
self.print_error(traceback.format_exc())
|
|
||||||
self.failed.emit()
|
self.failed.emit()
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
update_info = asyncio.run_coroutine_threadsafe(self.get_update_info(), network.asyncio_loop).result()
|
||||||
|
except Exception as e:
|
||||||
|
#self.print_error(traceback.format_exc())
|
||||||
|
self.print_error(f"got exception: '{repr(e)}'")
|
||||||
|
self.failed.emit()
|
||||||
|
else:
|
||||||
|
self.checked.emit(update_info)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Reference in a new issue