From 685de8c801ade6d02e7c5033bf474036ffa57dbb Mon Sep 17 00:00:00 2001 From: joey <> Date: Sat, 11 Aug 2007 12:53:37 +0000 Subject: [PATCH] Return a real error when the group cannot be found out --- userdir_ldap.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/userdir_ldap.py b/userdir_ldap.py index cfd2c45..a048299 100644 --- a/userdir_ldap.py +++ b/userdir_ldap.py @@ -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 -- 2.20.1