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

@@ -54,10 +54,10 @@ class BaseWizard(object):
self.plugin, action = action
if self.plugin and hasattr(self.plugin, action):
f = getattr(self.plugin, action)
apply(f, (self,) + args)
f(self, *args)
elif hasattr(self, action):
f = getattr(self, action)
apply(f, args)
f(*args)
else:
raise BaseException("unknown action", action)

View File

@@ -97,7 +97,7 @@ class Commands:
# this wrapper is called from the python console
cmd = known_commands[method]
if cmd.requires_password and self.wallet.has_password():
password = apply(password_getter, ())
password = password_getter()
if password is None:
return
f = getattr(self, method)
@@ -105,9 +105,9 @@ class Commands:
result = f(*args, **{'password':password})
else:
result = f(*args)
if self._callback:
apply(self._callback, ())
self._callback()
return result
@command('')