Ticket #172 (closed defect: fixed)
the inheritance tree is not consulted when encoding attributes
| Reported by: | nick | Owned by: | nick |
|---|---|---|---|
| Priority: | major | Milestone: | 0.1 |
| Component: | Encoder | Version: | 0.1 |
| Keywords: | Cc: |
Description
Consider the following:
import pyamf class Person(object): pass class User(Person): pass pyamf.register_class(Person, 'spam.eggs.Person', attrs=['family_name', 'given_name']) pyamf.register_class(User, 'spam.eggs.User', attrs=['username', 'password']) u = User() u.family_name = 'Doe' u.given_name = 'Jane' u.username = 'j.doe' u.password = 'secret' stream = pyamf.encode(u) y = pyamf.decode(stream) print y.next().family_name
Now this should spit out Doe but it currently raises an AttributeError? as the Person class is not checked to see if a register_class entry has been created for it.
Change History
Note: See
TracTickets for help on using
tickets.
