ext: Disable extension if a dependency isn't of the correct version
Fixes #657
This commit is contained in:
parent
3c0cc1564c
commit
7ce38de351
@ -4,6 +4,14 @@ Changelog
|
||||
|
||||
This changelog is used to track all major changes to Mopidy.
|
||||
|
||||
|
||||
v0.18.1 (UNRELEASED)
|
||||
====================
|
||||
|
||||
- Disable extension instead of crashing if a dependency has the wrong
|
||||
version. (Fixes: :issue:`657`)
|
||||
|
||||
|
||||
v0.18.0 (2014-01-19)
|
||||
====================
|
||||
|
||||
|
||||
@ -222,6 +222,12 @@ def validate_extension(extension):
|
||||
'Disabled extension %s: Dependency %s not found',
|
||||
extension.ext_name, ex)
|
||||
return False
|
||||
except pkg_resources.VersionConflict as ex:
|
||||
found, required = ex.args
|
||||
logger.info(
|
||||
'Disabled extension %s: %s required, but found %s at %s',
|
||||
extension.ext_name, required, found, found.location)
|
||||
return False
|
||||
|
||||
try:
|
||||
extension.validate_environment()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user