diff options
author | Olivier Le Thanh Duong <olivier@lethanh.be> | 2010-02-23 22:23:48 +0100 |
---|---|---|
committer | Olivier Le Thanh Duong <olivier@lethanh.be> | 2010-02-26 16:13:19 +0100 |
commit | 6e2c862fe2e0ff9c215a27e24debf15e6ee974f2 (patch) | |
tree | 4eb1f6b4700576ef7b06b7faf38f69415d475bf2 /src | |
parent | d7b244991255eacaee57fca210fe23616325ddd2 (diff) |
Fix connection.check_parameters to accept dbus.Boolean
Connection.check_parameters checked if the 'b' marked parameter were of the
bool class or a subclass of it, however dbus.Boolean is a subclass of
int since bool can't be subclassed and so a error was raised. This add
dbus.Boolean to the list of accepted parameters.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/conn.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/conn.py b/src/server/conn.py index 3c017eb..473936a 100644 --- a/src/server/conn.py +++ b/src/server/conn.py @@ -129,7 +129,7 @@ class Connection(_Connection, DBusProperties): if not isinstance(value, (int, long)): raise InvalidArgument('incorrect type to %s parameter, got %s, expected an int' % (parm, type(value))) elif sig == 'b': - if not isinstance(value, bool): + if not isinstance(value, (bool, dbus.Boolean)): raise InvalidArgument('incorrect type to %s parameter, got %s, expected an boolean' % (parm, type(value))) else: raise TypeError('unknown type signature %s in protocol parameters' % type) |