From 9f9ca363c97fd6d3db6fd55b18ff1148065a225b Mon Sep 17 00:00:00 2001 From: Thijs Triemstra Date: Tue, 10 Dec 2019 22:10:54 +0100 Subject: [PATCH] hash is a reserved symbol name (#282) --- demo/database_auth/db_auth.py | 4 ++-- docs/example_db_auth.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/database_auth/db_auth.py b/demo/database_auth/db_auth.py index 3c3eb93..72b1ad2 100644 --- a/demo/database_auth/db_auth.py +++ b/demo/database_auth/db_auth.py @@ -57,6 +57,6 @@ async def check_credentials(db_engine, username, password): ret = await conn.execute(query) user = await ret.fetchone() if user is not None: - hash = user[2] - return sha256_crypt.verify(password, hash) + hashed = user[2] + return sha256_crypt.verify(password, hashed) return False diff --git a/docs/example_db_auth.rst b/docs/example_db_auth.rst index 5e9463a..1b11781 100644 --- a/docs/example_db_auth.rst +++ b/docs/example_db_auth.rst @@ -53,7 +53,7 @@ Now you have two tables: +-----------------+ | user_id | +-----------------+ -| permission_name | +| perm_name | +-----------------+