--On Sonntag, 20. Februar 2005 19:42 Uhr +0100 Dieter Maurer <[EMAIL PROTECTED]> wrote:

You can use the "getattr" above to resolve the attribute.

That really did not help:

-> print getattr(self.manage_FTPlist, '__roles__')
AttributeError: "'function' object has no attribute '__roles__'"

-> print getattr(self.manage_FTPlist, '__roles__')
(Pdb) dir(self.manage_FTPlist)
['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__get__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'im_class', 'im_func', 'im_self']
(Pdb) self.manage_FTPlist
<bound method Application.manage_FTPlist of <OFS.Application.Application object at 0xb761fcec>>
(Pdb) self.manage_FTPlist.__dict__

So there must be more magic involved get this code running again.


Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to