mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Improve error messages when MySQLdb is not installed (#27871)
The python package is called MySQL-python in pypi, and reporting this rather than mysqldb makes resolving the problem far easier.
This commit is contained in:
@@ -149,7 +149,7 @@ def main():
|
||||
if match('^[0-9a-z_]+$', mysqlvar) is None:
|
||||
module.fail_json(msg="invalid variable name \"%s\"" % mysqlvar)
|
||||
if not mysqldb_found:
|
||||
module.fail_json(msg="the python mysqldb module is required")
|
||||
module.fail_json(msg="The MySQL-python module is required.")
|
||||
else:
|
||||
warnings.filterwarnings('error', category=MySQLdb.Warning)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user