diff --git a/lib/ansible/modules/user.py b/lib/ansible/modules/user.py index ebc67896bf7..1f3b0c4e306 100644 --- a/lib/ansible/modules/user.py +++ b/lib/ansible/modules/user.py @@ -3140,7 +3140,7 @@ class BusyBox(User): with open("/etc/shells", "r") as f: shells = [ shell - for shell in (line.strip() for line in f.readlines()) + for shell in (line.strip() for line in f) if shell and not shell.startswith("#") ]