summary refs log tree commit diff
path: root/synapse/python_dependencies.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-02-13 16:12:49 +0000
committerGitHub <noreply@github.com>2019-02-13 16:12:49 +0000
commitc6e75c9f2da08c459652603023ba4319c81510f1 (patch)
tree20cdd093ae0f12d0e02074941b436e7e6523b571 /synapse/python_dependencies.py
parentMerge remote-tracking branch 'origin/release-v0.99.1' into develop (diff)
parentFix error message for optional dependencies (diff)
downloadsynapse-c6e75c9f2da08c459652603023ba4319c81510f1.tar.xz
Merge pull request #4450 from 14mRh4X0r/fix-dependency-message
Fix error message for optional dependencies
Diffstat (limited to 'synapse/python_dependencies.py')
-rw-r--r--synapse/python_dependencies.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py
index 5d087ee26b..590ee59907 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