Skip to content

Commit 98cf24a

Browse files
author
Yamashita Yuu
committed
do not raise AssertionError if the response is 0. 0 is False in Python 2.
1 parent 2003589 commit 98cf24a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

msgpackrpc/future.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ def result(self):
4444
return self._result
4545

4646
def set_result(self, result):
47-
assert result
47+
assert result is not None
4848
self.set(result=result)
4949

5050
@property
5151
def error(self):
5252
return self._error
5353

5454
def set_error(self, error):
55-
assert error
55+
assert error is not None
5656
self.set(error=error)
5757

5858
def attach_callback(self, callback):

0 commit comments

Comments
 (0)