diff options
author | Kali Kaneko <kali@leap.se> | 2016-07-06 13:54:12 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-07-06 13:54:12 +0200 |
commit | 44bfc93d60c0060f6153609c86f5deebfd084d2e (patch) | |
tree | bd13c1d14ae3afcbb0aa9127fdf4c907e805f8da | |
parent | 8405f6319d447b4c5ca850c625370c5181ce1b16 (diff) |
[refactor] rename printer callback
-rw-r--r-- | src/leap/bitmask/cli/command.py | 8 |
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 |