New submission from TomoyukiKano <t...@appletz.jp>:

Some new-style class (pymongo's) uses __getattr__() to create new child 
instance.
If a object is a instance of new-style class, __getattribute__ should be used.

*** venusian/__init__.py        2011-02-23 18:29:54.522432757 +0900
--- venusian/__init__.py.~1~    2011-02-23 06:33:08.000000000 +0900
***************
*** 9,16 ****
  
  def safe_getattr(ob, attr, default=None):
      try:
-         if hasattr(ob, '__getattribute__'):
-             return ob.__getattribute__(attr)
          return getattr(ob, attr)
      except:
          # some metaclasses do insane things when asked for an attribute (like
--- 9,14 ----

----------
messages: 481
nosy: tomyuk
priority: bug
status: unread
title: venusian cannot work with pymongo

__________________________________
Repoze Bugs <b...@bugs.repoze.org>
<http://bugs.repoze.org/issue176>
__________________________________
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to