Fix "TypeError: group id must be integer" if groupid passed in for group

key
pull/4420/head
Peter Hall 2014-07-15 11:16:47 +10:00
parent f063aafeeb
commit 09a5d8f6d1
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ class User(object):
def group_exists(self,group):
try:
if group.isdigit():
if grp.getgrgid(group):
if grp.getgrgid(int(group)):
return True
else:
if grp.getgrnam(group):