summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS.txt2
-rw-r--r--docs/tutorials/wiki2/src/authentication/tutorial/models/user.py2
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/models/user.py2
-rw-r--r--docs/tutorials/wiki2/src/tests/tutorial/models/user.py2
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/models/user.py2
-rw-r--r--pyramid/compat.py5
6 files changed, 7 insertions, 8 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 55fdf096b..762793d0b 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -268,3 +268,5 @@ Contributors
- Arian Maykon de A. Diógenes, 2016/04/13
- Vincent Férotin, 2016/05/08
+
+- Berker Peksag, 2016/05/16
diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py b/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
index 6bd3315d6..6fb32a1b2 100644
--- a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
@@ -23,7 +23,7 @@ class User(Base):
def check_password(self, pw):
if self.password_hash is not None:
- expected_hash = self.password_hash
+ expected_hash = self.password_hash.encode('utf8')
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/docs/tutorials/wiki2/src/models/tutorial/models/user.py b/docs/tutorials/wiki2/src/models/tutorial/models/user.py
index 6bd3315d6..6fb32a1b2 100644
--- a/docs/tutorials/wiki2/src/models/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/models/tutorial/models/user.py
@@ -23,7 +23,7 @@ class User(Base):
def check_password(self, pw):
if self.password_hash is not None:
- expected_hash = self.password_hash
+ expected_hash = self.password_hash.encode('utf8')
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/docs/tutorials/wiki2/src/tests/tutorial/models/user.py b/docs/tutorials/wiki2/src/tests/tutorial/models/user.py
index 6bd3315d6..6fb32a1b2 100644
--- a/docs/tutorials/wiki2/src/tests/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/tests/tutorial/models/user.py
@@ -23,7 +23,7 @@ class User(Base):
def check_password(self, pw):
if self.password_hash is not None:
- expected_hash = self.password_hash
+ expected_hash = self.password_hash.encode('utf8')
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/docs/tutorials/wiki2/src/views/tutorial/models/user.py b/docs/tutorials/wiki2/src/views/tutorial/models/user.py
index 6bd3315d6..6fb32a1b2 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/views/tutorial/models/user.py
@@ -23,7 +23,7 @@ class User(Base):
def check_password(self, pw):
if self.password_hash is not None:
- expected_hash = self.password_hash
+ expected_hash = self.password_hash.encode('utf8')
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/pyramid/compat.py b/pyramid/compat.py
index 0532e179f..8c8645460 100644
--- a/pyramid/compat.py
+++ b/pyramid/compat.py
@@ -3,10 +3,7 @@ import platform
import sys
import types
-if platform.system() == 'Windows': # pragma: no cover
- WIN = True
-else: # pragma: no cover
- WIN = False
+WIN = platform.system() == 'Windows'
try: # pragma: no cover
import __pypy__