[sysadmin-bin] Make sure the membership list is utf8 encoded
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Make sure the membership list is utf8 encoded
- Date: Wed, 8 Oct 2014 16:50:18 +0000 (UTC)
commit e4b18f30d03a7c1e9b9467790f6d583aaa963a31
Author: Andrea Veri <av gnome org>
Date: Wed Oct 8 18:50:14 2014 +0200
Make sure the membership list is utf8 encoded
membership/foundation-operations.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index 9d684dd..71b7a75 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -143,9 +143,10 @@ def generate_membership_list():
d = { 'common_name' : cn }
result.append(d)
- memberslist = json.dumps(result, encoding='utf8')
+ memberslist = json.dumps(result, ensure_ascii=False, encoding='utf8')
- membershipfile = open('/var/www/html/foundation/membershiplist', 'w')
+ import codecs
+ membershipfile = codecs.open('/var/www/html/foundation/membershiplist', 'w')
membershipfile.write(memberslist)
membershipfile.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]