Skip to content

Commit

Permalink
more error resilient for voter_id encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
benadida committed Jun 5, 2011
1 parent fac81fe commit 5c49182
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helios/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,10 @@ def voter_id_hash(self):
try:
return utils.hash_b64(value_to_hash)
except:
return utils.hash_b64(value_to_hash.encode('latin-1'))
try:
return utils.hash_b64(value_to_hash.encode('latin-1'))
except:
return utils.hash_b64(value_to_hash.encode('utf-8'))

@property
def voter_type(self):
Expand Down

0 comments on commit 5c49182

Please sign in to comment.