diff options
author | Houzéfa Abbasbhay <houzefa.abba@xcg-consulting.fr> | 2014-12-02 15:31:04 (GMT) |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2015-02-12 18:21:12 (GMT) |
commit | efc5429cfc8f8ee1ecc95ef9bf757b4168661bc8 (patch) | |
tree | 16011178d84fb0ce2f745dbbcba8fd4585dcb909 /bindings | |
parent | e325164c8a4171627841559a566029d2d9507d38 (diff) | |
download | lasso-efc5429cfc8f8ee1ecc95ef9bf757b4168661bc8.zip lasso-efc5429cfc8f8ee1ecc95ef9bf757b4168661bc8.tar.gz lasso-efc5429cfc8f8ee1ecc95ef9bf757b4168661bc8.tar.bz2 |
Python 3: Fix a string conversion helper
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/python/lang.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bindings/python/lang.py b/bindings/python/lang.py index 8f5ea59..7fa168e 100644 --- a/bindings/python/lang.py +++ b/bindings/python/lang.py @@ -124,7 +124,8 @@ def cptrToPy(cptr): return o def str2lasso(s): - if isinstance(s, unicode): + if s is not None and not isinstance(s, str): + # Assume this is a Python 2 unicode string. return s.encode('utf-8') return s |