Menu

#1 Minor tweak for Python 2.2.2

open
nobody
None
5
2003-03-10
2003-03-10
Jason Kane
No

If you're getting "Data to decrypt must be a string"
from the AES module and you're sending it a string,
odds are this is what you need:

aes.py, line 192

Old:
if str(type(data)) != "<type 'string'>":
raise TypeError('Data to decrypt must be a string!')

New:
if type(data) != type(""):
raise TypeError('Data to ...

--------
Somewhere along the line the return value of
type(stringvar) changed from <type 'string'> to <type
'str'>. This adjustment should work for any version of
Python.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.