[sysadmin-bin] Seems it was expecting a string from us



commit 4effe992f63962032ef0643a5feaf2782835635a
Author: Andrea Veri <av gnome org>
Date:   Sat May 3 21:47:05 2014 +0200

    Seems it was expecting a string from us

 membership/foundation-db-operations.py |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/membership/foundation-db-operations.py b/membership/foundation-db-operations.py
index e5bfb07..e437f64 100755
--- a/membership/foundation-db-operations.py
+++ b/membership/foundation-db-operations.py
@@ -124,7 +124,7 @@ def emeritus_members():
     emeritus_members_list = query_database_with("SELECT userid from foundationmembers where emeritus = '1';")
 
     for row in emeritus_members_list:
-        return row[0]
+        return str(row[0])
 
 
 def main():
@@ -209,14 +209,15 @@ def sync_foundation_db_with_ldap():
     for row in foundationmembers:
         if row[0] is not None and row[0] != '':
             if row[0] not in mailusers:
-                (sync_user_to_ldap_mailusers(row[0]))
+                (sync_user_to_ldap_mailusers(str(row[0])))
             if row[0] not in foundation:
-                (sync_user_to_ldap_foundation(row[0]))
+                (sync_user_to_ldap_foundation(str(row[0])))
 
-    if emeritus_members_list not in mailusers:
-        (sync_user_to_ldap_mailusers(emeritus_members_list))
-    if emeritus_members_list not in foundation:
-        (sync_user_to_ldap_foundation(emeritus_members_list))
+    if row[0] is not None and row[0] != '':
+        if emeritus_members_list not in mailusers:
+            (sync_user_to_ldap_mailusers(emeritus_members_list))
+        if emeritus_members_list not in foundation:
+            (sync_user_to_ldap_foundation(emeritus_members_list))
 
 
 def subscribe_new_members():


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