diff options
author | Barry Warsaw <barry@python.org> | 2011-12-13 17:26:15 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2011-12-13 17:26:15 -0500 |
commit | dc7b07bc5921cd6263552bb1f3351416327fd67c (patch) | |
tree | 5cbea0d4e4d612aee858f0c627006b9a7229c67c | |
parent | e033b0c8f22a67abfe2ba1b61365d0c2570b7429 (diff) | |
download | dbus-python-dc7b07bc5921cd6263552bb1f3351416327fd67c.tar.gz |
Modernize `raise` syntax in preparation of Python 3 support.
-rw-r--r-- | dbus/decorators.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dbus/decorators.py b/dbus/decorators.py index a5ca281..71a7203 100644 --- a/dbus/decorators.py +++ b/dbus/decorators.py @@ -182,9 +182,9 @@ def method(dbus_interface, in_signature=None, out_signature=None, in_sig = tuple(Signature(in_signature)) if len(in_sig) > len(args): - raise ValueError, 'input signature is longer than the number of arguments taken' + raise ValueError('input signature is longer than the number of arguments taken') elif len(in_sig) < len(args): - raise ValueError, 'input signature is shorter than the number of arguments taken' + raise ValueError('input signature is shorter than the number of arguments taken') func._dbus_is_method = True func._dbus_async_callbacks = async_callbacks @@ -325,9 +325,9 @@ def signal(dbus_interface, signature=None, path_keyword=None, sig = tuple(Signature(signature)) if len(sig) > len(args): - raise ValueError, 'signal signature is longer than the number of arguments provided' + raise ValueError('signal signature is longer than the number of arguments provided') elif len(sig) < len(args): - raise ValueError, 'signal signature is shorter than the number of arguments provided' + raise ValueError('signal signature is shorter than the number of arguments provided') emit_signal.__name__ = func.__name__ emit_signal.__doc__ = func.__doc__ |