diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-12-06 16:08:52 -0500 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-12-06 16:08:52 -0500 |
| commit | c5ec1f9c49522a357075c9a0353b028f930e04ad (patch) | |
| tree | 936e96672725980be447a6601ca80444a8f36040 /passlib/apache.py | |
| parent | e2f085dd5606c4c1547803cfcbddd5796009f50f (diff) | |
| download | passlib-c5ec1f9c49522a357075c9a0353b028f930e04ad.tar.gz | |
added compat.unicode imports in a number of places
this distinguishes the types, so that for isinstance() tests...
* 'unicode' always means the unicode type
* 'bytes' always means the bytes type
* 'str' always means the native string type
Diffstat (limited to 'passlib/apache.py')
| -rw-r--r-- | passlib/apache.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passlib/apache.py b/passlib/apache.py index b43e04d..1d50c8f 100644 --- a/passlib/apache.py +++ b/passlib/apache.py @@ -13,7 +13,7 @@ import sys from passlib.context import CryptContext from passlib.utils import render_bytes, bjoin, bytes, b, \ to_unicode, to_bytes, consteq -from passlib.utils.compat import lmap +from passlib.utils.compat import lmap, unicode #pkg #local __all__ = [ @@ -85,7 +85,7 @@ class _CommonFile(object): passwords will be loaded directly from this string, and any files will be ignored. """ - if isinstance(content, unicode): + if instance(content, unicode): content = content.encode(self.encoding or 'utf-8') self.mtime = 0 #XXX: replace this with iterator? |
