fritzy/SleekXMPP — Issue #123: XEP-0009 Incorrectly returns boolean False as True
Author: correl
Created: 2011-12-16 17:08:27+00:00
State: open

When an XML RPC response is received with a boolean value of 0, the xmlrpc library should return False. It is instead returning True

```xml

0

```

It appears this has to do with the boolean value conversion happening in xep_0009's `binding.py`:
```python
if value.find('{%s}boolean' % namespace) is not None:
return bool(value.find('{%s}boolean' % namespace).text)
```

It's casting the string contents of the tag, in this case `"0"` or `"1"` to boolean, which is always True

For now, I've changed the lines to the following:
```python
if value.find('{%s}boolean' % namespace) is not None:
return bool(int(value.find('{%s}boolean' % namespace).text))
```

I'll be pushing this change to my local branch soon, and I'll submit a pull request once I've added some unit tests for these value conversions.