Skip to content

Commit

Permalink
better name
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Apr 4, 2017
1 parent d65edc5 commit 5457f4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion m2mclient/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from __future__ import unicode_literals

VERSION = "0.1.6a1"
VERSION = "0.1.6a2"
8 changes: 4 additions & 4 deletions m2mclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(self, name):
def __repr__(self):
return "CommandResult({!r})".format(self.name)

def set_result(self, result):
def set(self, result):
"""Set the result from another thread."""
log.debug('command result %r', result)
self._result = result
Expand Down Expand Up @@ -169,7 +169,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):

while self.command_events:
command_id, result = self.command_events.popitem()
result.set_result(None)
result.set(None)

def get_identity(self, timeout=10):
"""
Expand Down Expand Up @@ -284,9 +284,9 @@ def on_command(self, command_id, result):
command_result = self.command_events.pop(command_id)
except KeyError:
log.error('received a response to an unknown event')
command.set_result(None)
command_result.set(None)
else:
command.set_result(result)
command_result.set(result)

@expose(PacketType.set_identity)
def handle_set_identitiy(self, identity):
Expand Down

0 comments on commit 5457f4c

Please sign in to comment.