mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix "TypeError: group id must be integer" if groupid passed in for group
key
This commit is contained in:
@@ -440,7 +440,7 @@ class User(object):
|
|||||||
def group_exists(self,group):
|
def group_exists(self,group):
|
||||||
try:
|
try:
|
||||||
if group.isdigit():
|
if group.isdigit():
|
||||||
if grp.getgrgid(group):
|
if grp.getgrgid(int(group)):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if grp.getgrnam(group):
|
if grp.getgrnam(group):
|
||||||
|
|||||||
Reference in New Issue
Block a user