From d528406cb875b78907c7f7dc9872c1d2c22dc46c Mon Sep 17 00:00:00 2001 From: Willem Mulder Date: Wed, 23 Jan 2019 18:41:59 +0100 Subject: Fix error message for optional dependencies Signed-off-by: Willem Mulder --- synapse/python_dependencies.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'synapse') diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 756721e304..df3e94dee0 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -143,9 +143,12 @@ def check_requirements(for_feature=None, _get_distribution=get_distribution): for dependency in OPTS: try: _get_distribution(dependency) - except VersionConflict: + except VersionConflict as e: deps_needed.append(dependency) - errors.append("Needed %s but it was not installed" % (dependency,)) + errors.append( + "Needed optional %s, got %s==%s" + % (dependency, e.dist.project_name, e.dist.version) + ) except DistributionNotFound: # If it's not found, we don't care pass -- cgit 1.4.1