mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Final round of moving modules to new import error msg (#51852)
* Final round of moving modules to new import error msg * readd URL to jenkins install guide * fix unit tests
This commit is contained in:
parent
ffbc9d99de
commit
a39c4ad464
42 changed files with 292 additions and 150 deletions
|
@ -729,11 +729,13 @@ def jsonify(data, **kwargs):
|
|||
raise UnicodeError('Invalid unicode encoding encountered')
|
||||
|
||||
|
||||
def missing_required_lib(library, reason=None):
|
||||
def missing_required_lib(library, reason=None, url=None):
|
||||
hostname = platform.node()
|
||||
msg = "Failed to import the required Python library (%s) on %s's Python %s." % (library, hostname, sys.executable)
|
||||
if reason:
|
||||
msg += " This is required %s." % reason
|
||||
if url:
|
||||
msg += " See %s for more info." % url
|
||||
|
||||
return msg + " Please read module documentation and install in the appropriate location"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue