mopidy/mopidy/exceptions.py
Thomas Adamcik 2f01fc4e46 scanner: Review comments and flake fixes
- Move ScannerError to exceptions module.
- Subclass ScannerError from MopidyException.
- Fix import sorting.
2013-10-20 15:51:39 +02:00

25 lines
562 B
Python

from __future__ import unicode_literals
class MopidyException(Exception):
def __init__(self, message, *args, **kwargs):
super(MopidyException, self).__init__(message, *args, **kwargs)
self._message = message
@property
def message(self):
"""Reimplement message field that was deprecated in Python 2.6"""
return self._message
@message.setter # noqa
def message(self, message):
self._message = message
class ExtensionError(MopidyException):
pass
class ScannerError(MopidyException):
pass