diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 15:08:56 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 15:08:56 -0400 |
commit | 3709566d41523e5bc31e1063b647e90f1469744a (patch) | |
tree | e29eed3fa76fad9373432cda397ff7dc9cb24e4e /passlib/handlers/postgres.py | |
parent | 56017e683f8e31be252c94f23d4dd22a2d5603f9 (diff) | |
download | passlib-3709566d41523e5bc31e1063b647e90f1469744a.tar.gz |
cleanup old python compat -- replaced "unicode" alias in favor of "str"
Diffstat (limited to 'passlib/handlers/postgres.py')
-rw-r--r-- | passlib/handlers/postgres.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passlib/handlers/postgres.py b/passlib/handlers/postgres.py index e832c47..aead4c1 100644 --- a/passlib/handlers/postgres.py +++ b/passlib/handlers/postgres.py @@ -8,7 +8,7 @@ import logging; log = logging.getLogger(__name__) # site # pkg from passlib.utils import to_bytes -from passlib.utils.compat import str_to_uascii, unicode +from passlib.utils.compat import str_to_uascii import passlib.utils.handlers as uh # local __all__ = [ @@ -41,7 +41,7 @@ class postgres_md5(uh.HasUserContext, uh.StaticHandler): # primary interface #=================================================================== def _calc_checksum(self, secret): - if isinstance(secret, unicode): + if isinstance(secret, str): secret = secret.encode("utf-8") user = to_bytes(self.user, "utf-8", param="user") return str_to_uascii(md5(secret + user).hexdigest()) |