Skip to content

Commit

Permalink
Merge pull request #43 from gardarh/master
Browse files Browse the repository at this point in the history
sigFromPy() should marshal boolean values as bool, not int
  • Loading branch information
cocagne committed Dec 19, 2016
2 parents 28e4e2c + 43a6b8a commit 975bd25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion txdbus/marshal.py
Expand Up @@ -239,7 +239,8 @@ def sigFromPy( pobj ):

if sig is not None:
return sig


elif isinstance(pobj, bool): return 'b'
elif isinstance(pobj, int): return 'i'
elif isinstance(pobj, six.integer_types): return 'x'
elif isinstance(pobj, float): return 'd'
Expand Down
3 changes: 3 additions & 0 deletions txdbus/test/test_marshal.py
Expand Up @@ -31,6 +31,9 @@ def t(self, p, s):
def test_int(self):
self.t(1,'i')

def test_bool(self):
self.t(True,'b')

def test_long(self):
if six.PY2:
self.t(long(1),'x')
Expand Down

0 comments on commit 975bd25

Please sign in to comment.