Make dictionary comprehension 2.6 compatible

This commit is contained in:
Jorge-Rodriguez 2020-11-17 13:39:36 +02:00
parent 5646003189
commit 46d7f4106e
No known key found for this signature in database
GPG key ID: 43153D1EFD8F7D90

View file

@ -797,7 +797,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
module.warn(note)
module.warn("Account locking settings are being ignored.")
current_locking = get_account_locking(cursor, user, host)
clear_locking = {x: y for x, y in locking.items() if y != '0'}
clear_locking = dict((x, y) for x, y in locking.items() if y != '0')
if current_locking != clear_locking:
msg = "Account locking updated"
if module.check_mode: