[sysadmin-bin] handle-ldap-modules: properly check if it is a string



commit 0c9d061cd0bfa6461393f7831dea36bf17c55d09
Author: Olav Vitters <olav vitters nl>
Date:   Wed Mar 9 00:52:36 2011 +0100

    handle-ldap-modules: properly check if it is a string

 handle-ldap-modules |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/handle-ldap-modules b/handle-ldap-modules
index 29c5bd0..a3be824 100755
--- a/handle-ldap-modules
+++ b/handle-ldap-modules
@@ -359,11 +359,11 @@ it probably requires some other setting.""")
                     continue
 
                 uid = maint.find_property((self.GNOME, u'userid'))
-                if uid.__class__.__name__ != "unicode":
+                if not isinstance(uid, basestring):
                     continue
 
                 name = maint.find_property((self.FOAF, u'name'))
-                if name.__class__.__name__ != "unicode":
+                if not isinstance(name, basestring):
                     continue
 
                 email = maint.find_property((self.FOAF, u'mbox'))



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