Ticket #334 (closed enhancement: fixed)

Opened 4 months ago

Last modified 3 months ago

More helpful description for register_class args check

Reported by: thijs Owned by: nick
Priority: major Milestone: 0.4
Component: Remoting Version: 0.3.1
Keywords: Cc: mvtellingen

Description

When I try to start the attached server it throws:

Traceback (most recent call last):
  File "server.py", line 55, in <module>
    register_class(User, 'org.pyamf.User')
  File "/pyamf/trunk/pyamf/__init__.py", line 644, in register_class
    raise TypeError("pyamf doesn't support required init arguments")
TypeError: pyamf doesn't support required init arguments

but this confuses me as a user ;) njoyce suggested a more helpful description like:

TypeError: in __init__(self, bla, blah, blarg) of the User class etc

Attachments

server.py (4.4 KB) - added by thijs 4 months ago.

Change History

Changed 4 months ago by thijs

comment:1 Changed 4 months ago by thijs

  • status changed from new to assigned
  • owner changed from nick to mvtellingen

comment:2 Changed 4 months ago by mvtellingen

  • keywords review added
  • owner changed from mvtellingen to nick

Fixed in the register_class-args-check-334 branch. The exception is now:

TypeError: __init__ doesn't support additional arguments: Foo.__init__(self, bar, valid=1)

comment:3 Changed 4 months ago by nick

  • keywords review removed
  • owner changed from nick to mvtellingen

Use self.assertTrue(bla) instead of assert something, else and then its good to be merged.

comment:4 Changed 4 months ago by thijs

  • cc mvtellingen added

comment:5 Changed 3 months ago by nick

  • owner changed from mvtellingen to nick

Merged in r1593.

comment:6 Changed 3 months ago by nick

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.