docs: Make extensiondev example and API docs for validate_environment() match
(cherry picked from commit 31c874b3eb)
This commit is contained in:
parent
fe63e425d5
commit
c9b0101e76
@ -317,7 +317,7 @@ This is ``mopidy_soundspot/__init__.py``::
|
||||
gobject.type_register(SoundspotMixer)
|
||||
gst.element_register(
|
||||
SoundspotMixer, 'soundspotmixer', gst.RANK_MARGINAL)
|
||||
|
||||
|
||||
# Or nothing to register e.g. command extension
|
||||
pass
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ class Extension(object):
|
||||
return schema
|
||||
|
||||
def get_command(self):
|
||||
"""Command to expose to command line users running mopidy.
|
||||
"""Command to expose to command line users running ``mopidy``.
|
||||
|
||||
:returns:
|
||||
Instance of a :class:`~mopidy.commands.Command` class.
|
||||
@ -60,12 +60,13 @@ class Extension(object):
|
||||
pass
|
||||
|
||||
def validate_environment(self):
|
||||
"""Checks if the extension can run in the current environment
|
||||
"""Checks if the extension can run in the current environment.
|
||||
|
||||
For example, this method can be used to check if all dependencies that
|
||||
are needed are installed. If a problem is found, raise
|
||||
:exc:`~mopidy.exceptions.ExtensionError` with a message explaining the
|
||||
issue.
|
||||
Dependencies described by :file:`setup.py` are checked by Mopidy, so
|
||||
you should not check their presence here.
|
||||
|
||||
If a problem is found, raise :exc:`~mopidy.exceptions.ExtensionError`
|
||||
with a message explaining the issue.
|
||||
|
||||
:raises: :exc:`~mopidy.exceptions.ExtensionError`
|
||||
:returns: :class:`None`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user