Minor bug fix for a traceback

This commit is contained in:
Bernardo Damele 2011-01-20 21:50:21 +00:00
parent 1d5050d577
commit aa8a20d241

View File

@ -230,7 +230,7 @@ class _baseDes(object):
# there is no way to correctly decode the data into bytes.
if _pythonMajorVersion < 3:
if isinstance(data, unicode):
raise ValueError("pyDes can only work with bytes, not Unicode strings.")
data = str(data)
else:
if isinstance(data, str):
# Only accept ascii unicode values.