[sysadmin-bin] Make sure NULL and empty rows are not being taken into account at all



commit d3639fc72485f8bd370813ccfef1394f7280d1d5
Author: Andrea Veri <av gnome org>
Date:   Sat May 3 21:38:02 2014 +0200

    Make sure NULL and empty rows are not being taken into account at all

 membership/foundation-db-operations.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/membership/foundation-db-operations.py b/membership/foundation-db-operations.py
index b94d0f4..e5bfb07 100755
--- a/membership/foundation-db-operations.py
+++ b/membership/foundation-db-operations.py
@@ -81,7 +81,7 @@ def query_database_with(query):
             anonvoting_password = str(dirty_password)
 
             sanitize_file=["\'","(",")","$mysql_password","=","[","]","\"",";"]
-             for i in range(len(sanitize_file)):
+            for i in range(len(sanitize_file)):
                  anonvoting_password = anonvoting_password.replace(sanitize_file[i],"")
     file.close()
 
@@ -207,6 +207,7 @@ def sync_foundation_db_with_ldap():
     foundation = (get_uids_from_group('foundation'))
 
     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]))
             if row[0] not in foundation:


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