1
0

Remove usages of deprecated apply() builtin

This commit is contained in:
suut
2017-08-01 05:22:18 +02:00
parent b95b21b2f2
commit bc4fcfbebd
7 changed files with 11 additions and 11 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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):