From aa8a20d2411b1ea2f754c3325afab8845b7929cb Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 20 Jan 2011 21:50:21 +0000 Subject: [PATCH] Minor bug fix for a traceback --- extra/pydes/pyDes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/pydes/pyDes.py b/extra/pydes/pyDes.py index 0f079a2da..01c0d18d0 100644 --- a/extra/pydes/pyDes.py +++ b/extra/pydes/pyDes.py @@ -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.