v2 try of gid converted to integer

This commit is contained in:
Raine Curtis 2018-07-09 09:55:30 -06:00
parent d38951b1b3
commit b9556bf923

View file

@ -73,8 +73,14 @@ def _changes(name,
change = {}
if gid:
if lgrp['gid'] != gid:
change['gid'] = gid
try:
gid = int(gid)
if lgrp['gid'] != gid:
change['gid'] = gid
except (TypeError, ValueError):
ret['result'] = False
ret['comment'] = 'Invalid gid'
return ret
if members:
# -- if new member list if different than the current