summaryrefslogtreecommitdiff
path: root/passlib/context.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2015-07-23 13:44:09 -0400
committerEli Collins <elic@assurancetechnologies.com>2015-07-23 13:44:09 -0400
commitb2def15b0765e80e098025bdc4873fafdf0b3aa8 (patch)
tree39e69803efeb6b0d0f243c4586d7d776912e9763 /passlib/context.py
parent6cc82e5726c328cde492fa923db227b2c218b602 (diff)
downloadpasslib-b2def15b0765e80e098025bdc4873fafdf0b3aa8.tar.gz
minor fixes to some string isinstance() tests
Diffstat (limited to 'passlib/context.py')
-rw-r--r--passlib/context.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/passlib/context.py b/passlib/context.py
index 6958ac8..beb6752 100644
--- a/passlib/context.py
+++ b/passlib/context.py
@@ -1069,12 +1069,12 @@ class _CryptConfig(object):
pass
# type check
- if category is not None and not isinstance(category, str):
+ if category is not None and not isinstance(category, native_string_types):
if PY2 and isinstance(category, unicode):
# for compatibility with unicode-centric py2 apps
return self.get_record(scheme, category.encode("utf-8"))
raise ExpectedTypeError(category, "str or None", "category")
- if scheme is not None and not isinstance(scheme, str):
+ if scheme is not None and not isinstance(scheme, native_string_types):
raise ExpectedTypeError(scheme, "str or None", "scheme")
# if scheme=None,