def exception_wrapper(f):
@wraps(f)<EOL>def wrapper(*args, **kwds):<EOL><INDENT>try:<EOL><INDENT>return f(*args, **kwds)<EOL><DEDENT>except dbus.exceptions.DBusException as err:<EOL><INDENT>_args = err.args<EOL>raise PyMPRISException(*_args)<EOL><DEDENT><DEDENT>return wrapper<EOL>
Decorator to convert dbus exception to pympris exception.