Menu

#2 sha256: update function does not work under Python2.3

open
nobody
None
5
2003-11-04
2003-11-04
No

Calling sha256's update function fails for me (Python 2.3)
because the test for a string type is broken.
(str(type("")) gives "<type 'str'>".

As the SWIG code already checks for a string type
I suggest to just remove the whole check as redundant
and broken.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    it would be better to import types, then do
    if type(data) != types.StringType:

    This works for python2.1 onwards.

     
  • Nobody/Anonymous

    Logged In: NO

    it would be better to import types, then do
    if type(data) != types.StringType:

    This works for python2.1 onwards.

     

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.