aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'jm2l/models.py')
-rw-r--r--jm2l/models.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/jm2l/models.py b/jm2l/models.py
index 0bc212c..54acdf3 100644
--- a/jm2l/models.py
+++ b/jm2l/models.py
@@ -161,14 +161,14 @@ class User(Base):
@property
def my_hash(self):
m = hashlib.sha1()
- m.update("Nobody inspects ")
+ m.update("Nobody inspects ".encode('utf-8'))
if self.nom:
- m.update(unicode.encode(self.nom,'utf8'))
+ m.update(self.nom.encode('utf-8'))
if self.pseudo:
- m.update(unicode.encode(self.pseudo,'utf8'))
- if self.prenom:
- m.update(unicode.encode(self.prenom,'utf8'))
- m.update(" the spammish repetition")
+ m.update(self.pseudo.encode('utf-8'))
+ if self.prenom:
+ m.update(self.prenom.encode('utf-8'))
+ m.update(" the spammish repetition".encode('utf-8'))
return m.hexdigest()
@property