mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 18:50:21 -07:00
Simplify and correct comparisons with None.
This commit is contained in:
parent
2172201795
commit
fa8e653011
10 changed files with 16 additions and 16 deletions
|
@ -285,7 +285,7 @@ def main():
|
|||
module.fail_json(msg="when supplying login arguments, both login_user and login_password must be provided")
|
||||
|
||||
try:
|
||||
if module.params["login_unix_socket"] != None:
|
||||
if module.params["login_unix_socket"]:
|
||||
db_connection = MySQLdb.connect(host=module.params["login_host"], unix_socket=module.params["login_unix_socket"], user=login_user, passwd=login_password, db="mysql")
|
||||
else:
|
||||
db_connection = MySQLdb.connect(host=module.params["login_host"], user=login_user, passwd=login_password, db="mysql")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue