[sysadmin-bin] Fix the leftovers of the old setup



commit f702ab572273f679d8118075f265ed8f9d077250
Author: Andrea Veri <av gnome org>
Date:   Wed Oct 8 15:20:04 2014 +0200

    Fix the leftovers of the old setup

 membership/foundation-operations.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index acb0966..7c20fad 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -117,10 +117,10 @@ def remove_expired_memberships_from_foundation():
 
     for member in foundationmembers:
         last_renewed_on_attr = _get_attributes_from_ldap(member, 'LastRenewedOn')
-        convert_to_unix_time = calendar.timegm(strptime(last_renewed_on_attr[member], '%Y-%m-%d'))
+        convert_to_unix_time = calendar.timegm(strptime(last_renewed_on_attr, '%Y-%m-%d'))
 
         if member in foundationmembers and convert_to_unix_time < now - 365 * 2 * 24 * 60 * 60:
-            print "Removing %s from the foundation LDAP group as the membership expired on %s" % (member, 
last_renewed_on_attr[member])
+            print "Removing %s from the foundation LDAP group as the membership expired on %s" % (member, 
last_renewed_on_attr)
             remove_user_from_foundation_member(member)
 
 def send_form_letters(form_letter, email, name):
@@ -247,10 +247,10 @@ def subscribe_new_members():
         last_renewed_on_attr = _get_attributes_from_ldap(member, 'LastRenewedOn')
         mail_attr = _get_attributes_from_ldap(member,'mail')
 
-        if first_added_attr[member] == TODAY:
-            f.write(str(mail_attr[member]) + '\n')
+        if first_added_attr == TODAY:
+            f.write(str(mail_attr) + '\n')
         elif last_renewed_on_attr[member] == TODAY:
-            f.write(str(mail_attr[member]) + '\n')
+            f.write(str(mail_attr) + '\n')
         else:
             pass
 


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