[sysadmin-bin] Decode/encode accordingly
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Decode/encode accordingly
- Date: Fri, 18 Dec 2020 09:43:58 +0000 (UTC)
commit 38521af7761147140385fe2faae6a9b09e0a5e59
Author: Andrea Veri <averi redhat com>
Date: Fri Dec 18 10:43:21 2020 +0100
Decode/encode accordingly
membership/foundation-operations.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index 6c41b35..972bea4 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -61,16 +61,16 @@ foundationmembers = glu.get_uids_from_group('foundation')
def send_renewal_emails():
- _today = str(today)
+ _today = str(today).encode()
for member in foundationmembers:
ldap_fields = glu.get_attributes_from_ldap(member, 'FirstAdded', 'LastRenewedOn', 'mail', 'cn')
- first_added_attr = ldap_fields[1]
- last_renewed_on_attr = ldap_fields[2]
- mail_attr = ldap_fields[3]
- common_name_attr = ldap_fields[4]
- userid_attr = ldap_fields[0]
+ first_added_attr = ldap_fields[1].decode()
+ last_renewed_on_attr = ldap_fields[2].decode()
+ mail_attr = ldap_fields[3].decode()
+ common_name_attr = ldap_fields[4].decode()
+ userid_attr = ldap_fields[0].decode()
if (first_added_attr and last_renewed_on_attr):
if (last_renewed_on_attr == _today) and (first_added_attr == _today):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]