Return a real error when the group cannot be found out
authorjoey <>
Sat, 11 Aug 2007 12:53:37 +0000 (12:53 +0000)
committerjoey <>
Sat, 11 Aug 2007 12:53:37 +0000 (12:53 +0000)
userdir_ldap.py

index cfd2c45..a048299 100644 (file)
@@ -412,8 +412,11 @@ def GetUID(l,Name,UnknownMap = {}):
    return (None,None);
 
 def Group2GID(name):
-   """Returns the numerical id of a common group"""
+   """
+   Returns the numerical id of a common group
+   on error returns -1
+   """
    for g in DebianGroups.keys():
       if name == g:
          return DebianGroups[g]
-   return name
+   return -1