Cosmetic fix to failed required dependency reporting
As mentioned in if dependency('boost') fails, the error message
is 'Dependency "boost" not found, tried' (sic).
Similar to line 1451 above, suppress reporting the tried methods
returned by log_tried(), if the list is empty (as is the case with
boost)
@@ -1464,7 +1464,8 @@ def find_external_dependency(name, env, kwargs):
# we have a list of failed ExternalDependency objects, so we can report
# the methods we tried to find the dependency
- raise DependencyException('Dependency "%s" not found, tried %s' % (name, tried))
+ raise DependencyException('Dependency "%s" not found' % (name) +
+ (', tried %s' % (tried) if tried else ''))
# return the last failed dependency object
if pkgdep:
