Remove usages of deprecated apply() builtin
This commit is contained in:
@@ -87,7 +87,7 @@ def wizard_dialog(func):
|
||||
# out = ()
|
||||
if type(out) is not tuple:
|
||||
out = (out,)
|
||||
apply(run_next, out)
|
||||
run_next(*out)
|
||||
return func_wrapper
|
||||
|
||||
|
||||
|
||||
@@ -1708,7 +1708,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||
c = commands.Commands(self.config, self.wallet, self.network, lambda: self.console.set_json(True))
|
||||
methods = {}
|
||||
def mkfunc(f, method):
|
||||
return lambda *args: apply( f, (method, args, self.password_dialog ))
|
||||
return lambda *args: f(method, args, self.password_dialog)
|
||||
for m in dir(c):
|
||||
if m[0]=='_' or m in ['network','wallet']: continue
|
||||
methods[m] = mkfunc(c._run, m)
|
||||
|
||||
@@ -69,7 +69,7 @@ class EnterButton(QPushButton):
|
||||
|
||||
def keyPressEvent(self, e):
|
||||
if e.key() == Qt.Key_Return:
|
||||
apply(self.func,())
|
||||
self.func()
|
||||
|
||||
|
||||
class ThreadedButton(QPushButton):
|
||||
|
||||
Reference in New Issue
Block a user