Skip to content
Snippets Groups Projects
Commit d199fe00 authored by Ben Adida's avatar Ben Adida
Browse files

make sure unicode, not sure why tests didn't catch this

parent da8fd096
No related branches found
No related tags found
No related merge requests found
...@@ -653,7 +653,7 @@ class VoterFile(models.Model): ...@@ -653,7 +653,7 @@ class VoterFile(models.Model):
def itervoters(self): def itervoters(self):
if self.voter_file_content: if self.voter_file_content:
voter_stream = io.StringIO(self.voter_file_content, newline=None) voter_stream = io.StringIO(unicode(self.voter_file_content), newline=None)
else: else:
voter_stream = open(self.voter_file.path, "rU") voter_stream = open(self.voter_file.path, "rU")
...@@ -683,7 +683,7 @@ class VoterFile(models.Model): ...@@ -683,7 +683,7 @@ class VoterFile(models.Model):
# now we're looking straight at the content # now we're looking straight at the content
if self.voter_file_content: if self.voter_file_content:
voter_stream = io.StringIO(self.voter_file_content.encode('utf-8'), newline=None) voter_stream = io.StringIO(unicode(self.voter_file_content), newline=None)
else: else:
voter_stream = open(self.voter_file.path, "rU") voter_stream = open(self.voter_file.path, "rU")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment