summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-07-06 13:54:12 +0200
committerKali Kaneko <kali@leap.se>2016-07-06 13:54:12 +0200
commit44bfc93d60c0060f6153609c86f5deebfd084d2e (patch)
treebd13c1d14ae3afcbb0aa9127fdf4c907e805f8da /src
parent8405f6319d447b4c5ca850c625370c5181ce1b16 (diff)
[refactor] rename printer callback
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/cli/command.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py
index a3fd6289..ac427c76 100644
--- a/src/leap/bitmask/cli/command.py
+++ b/src/leap/bitmask/cli/command.py
@@ -81,9 +81,9 @@ class Command(object):
self.parser.print_help()
return defer.succeed(None)
- def _send(self, cb=_print_result):
+ def _send(self, printer=_print_result):
d = self._conn.sendMsg(*self.data, timeout=60)
- d.addCallback(self._check_err, cb)
+ d.addCallback(self._check_err, printer)
d.addErrback(self._timeout_handler)
return d
@@ -91,10 +91,10 @@ class Command(object):
print Fore.RED + "[!] %s" % msg + Fore.RESET
sys.exit(1)
- def _check_err(self, stuff, cb):
+ def _check_err(self, stuff, printer):
obj = json.loads(stuff[0])
if not obj['error']:
- return cb(obj['result'])
+ return printer(obj['result'])
else:
print Fore.RED + 'ERROR:' + '%s' % obj['error'] + Fore.RESET