Skip to content

Commit

Permalink
Fix cert whitelist output unicode issue
Browse files Browse the repository at this point in the history
The unicode header is only necessary for unicode
characters in the actual source code, so it has
been removed. The username field is a unicode
string already so it does not need to be encoded
again, and was causing an error on print.
  • Loading branch information
kluo authored and Giulio Gratta committed Jun 28, 2018
1 parent 5047294 commit aa6da49
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Management command which sets or gets the certificate whitelist for a given
user/course
Expand Down Expand Up @@ -114,7 +113,6 @@ def update_user_whitelist(username, add=True):
)
for whitelisted in whitelist:
username = whitelisted.user.username
username = username.encode('utf-8')
email = whitelisted.user.email
is_whitelisted = whitelisted.whitelist
print(username, email, is_whitelisted)

0 comments on commit aa6da49

Please sign in to comment.