[sysadmin-bin] The LDAP module is also needed



commit 3fbbfc702fca94853a603140091cca5caadf1064
Author: Andrea Veri <averi redhat com>
Date:   Fri Oct 13 18:21:27 2017 +0200

    The LDAP module is also needed

 gnome_ldap_utils.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnome_ldap_utils.py b/gnome_ldap_utils.py
index 8895efd..1975489 100755
--- a/gnome_ldap_utils.py
+++ b/gnome_ldap_utils.py
@@ -92,9 +92,9 @@ class Gnome_ldap_utils:
         remove_members = [(ldap.MOD_DELETE, 'member', 'uid=%s,%s' % (userid, self.LDAP_USER_BASE))]
         self.conn.modify_s('cn=%s,%s' % (group, self.LDAP_GROUP_BASE), remove_members)
 
-
     def add_or_update_description(self, userid, comment, add=False, update=False):
         import sys
+        import ldap
 
         if add and not update:
             update_comment = [(ldap.MOD_ADD, 'description', comment)]
@@ -103,4 +103,4 @@ class Gnome_ldap_utils:
             update_comment = [(ldap.MOD_REPLACE, 'description', comment)]
             self.conn.modify_s('uid=%s,%s' % (userid, self.LDAP_USER_BASE), update_comment)
         else:
-            sys.exit(1)
\ No newline at end of file
+            sys.exit(1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]