Menu

#27 Fix for:: looking for __bases__ on strings

open
nobody
None
5
2006-08-15
2006-08-15
No

Any module that declars a global instance of an object
gaves me the following error:

AttributeError: 'str' object has no attribute '__bases__'

This is because the check code to check that the token
is a class object is a little too greedy. It'll even
catch instances because of the hasattr...

The patch will work on 2.3 and up...but I think it'll
run an 2.2 and maybe 2.1.

Discussion

  • David Stanek

    David Stanek - 2006-08-15
     
  • Freek Dijkstra

    Freek Dijkstra - 2007-08-03

    Logged In: YES
    user_id=249025
    Originator: NO

    Fixes it for me. Thanks!

    Too bad the maintainer has not included this patch (at least it's not in 0.8.17).

     

Log in to post a comment.