1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

update.py: Remove unused 'global root' & some more typing

`global root` was never removed after `self.root` became a thing.
This commit is contained in:
Athanasius 2022-12-04 15:08:38 +00:00
parent e419e6dca0
commit 74ebba20b4
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -72,7 +72,7 @@ class Updater(object):
"""
self.root: Optional['tk.Tk'] = tkroot
self.provider: str = provider
self.thread: threading.Thread = None
self.thread: Optional[threading.Thread] = None
if self.use_internal():
return
@ -81,7 +81,7 @@ class Updater(object):
import ctypes
try:
self.updater = ctypes.cdll.WinSparkle
self.updater: Optional[ctypes.CDLL] = ctypes.cdll.WinSparkle
# Set the appcast URL
self.updater.win_sparkle_set_appcast_url(update_feed.encode())
@ -94,8 +94,6 @@ class Updater(object):
self.updater.win_sparkle_set_app_build_version(str(appversion_nobuild()))
# set up shutdown callback
global root
root = tkroot
self.callback_t = ctypes.CFUNCTYPE(None) # keep reference
self.callback_fn = self.callback_t(self.shutdown_request)
self.updater.win_sparkle_set_shutdown_request_callback(self.callback_fn)