Browse Source

threading.Thread: fix some DeprecationWarnings

"DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead"
patch-4
SomberNight 3 years ago
parent
commit
98feff07ad
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/contacts.py
  2. 2
      electrum/plugins/keepkey/keepkey.py
  3. 2
      electrum/plugins/safe_t/safe_t.py
  4. 2
      electrum/plugins/trezor/trezor.py
  5. 2
      electrum/plugins/trustedcoin/qt.py
  6. 2
      electrum/plugins/trustedcoin/trustedcoin.py

2
electrum/contacts.py

@ -103,7 +103,7 @@ class Contacts(dict, Logger):
self.alias_info = self.resolve_openalias(alias)
trigger_callback('alias_received')
t = threading.Thread(target=f)
t.setDaemon(True)
t.daemon = True
t.start()
def resolve_openalias(self, url):

2
electrum/plugins/keepkey/keepkey.py

@ -222,7 +222,7 @@ class KeepKeyPlugin(HW_PluginBase):
import threading
settings = self.request_trezor_init_settings(wizard, method, self.device)
t = threading.Thread(target=self._initialize_device_safe, args=(settings, method, device_id, wizard, handler))
t.setDaemon(True)
t.daemon = True
t.start()
exit_code = wizard.loop.exec_()
if exit_code != 0:

2
electrum/plugins/safe_t/safe_t.py

@ -180,7 +180,7 @@ class SafeTPlugin(HW_PluginBase):
import threading
settings = self.request_safe_t_init_settings(wizard, method, self.device)
t = threading.Thread(target=self._initialize_device_safe, args=(settings, method, device_id, wizard, handler))
t.setDaemon(True)
t.daemon = True
t.start()
exit_code = wizard.loop.exec_()
if exit_code != 0:

2
electrum/plugins/trezor/trezor.py

@ -222,7 +222,7 @@ class TrezorPlugin(HW_PluginBase):
import threading
settings = self.request_trezor_init_settings(wizard, method, device_id)
t = threading.Thread(target=self._initialize_device_safe, args=(settings, method, device_id, wizard, handler))
t.setDaemon(True)
t.daemon = True
t.start()
exit_code = wizard.loop.exec_()
if exit_code != 0:

2
electrum/plugins/trustedcoin/qt.py

@ -278,7 +278,7 @@ class Plugin(TrustedCoinPlugin):
tos_e.tos_signal.connect(on_result)
tos_e.error_signal.connect(on_error)
t = threading.Thread(target=request_TOS)
t.setDaemon(True)
t.daemon = True
t.start()
email_e.textChanged.connect(set_enabled)
email_e.setFocus(True)

2
electrum/plugins/trustedcoin/trustedcoin.py

@ -523,7 +523,7 @@ class TrustedCoinPlugin(BasePlugin):
if self.requesting is False:
self.requesting = True
t = Thread(target=self.request_billing_info, args=(wallet,))
t.setDaemon(True)
t.daemon = True
t.start()
return t

Loading…
Cancel
Save