You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason pyspades does it this way to begin with is because if a user types
an invalid number of arguments for a given command, it will throw a TypeError.
However, TypeError is a very common error in commands, and consuming it every
time it occurs makes debugging difficult.
Instead of catching this error which overlaps with many other "real" errors,
why not prevent it from occurring in the first place?
Attached is a patch for commands.py that validates parameter count (including
support for variable length *args) with inspect.getargspec(). The result is
cached in the function object itself to avoid any possible "inspection
overhead."
Original issue reported on code.google.com by [email protected] on 10 Aug 2012 at 6:02
The previous patch has been working for me, save for two bugs:
1. It did not account for optional args, so it prevented valid calls.
2. It got the wrong information about @admin commands.
Attached is another patch that addresses these issues and is hopefully more
legible.
Original issue reported on code.google.com by
[email protected]
on 10 Aug 2012 at 6:02Attachments:
The text was updated successfully, but these errors were encountered: