piranha/opster — pull request #28 by oscarbenjamin (2012-05-08 17:11:04+00:00)
Title: Fixed regression when using cmdtable parameter

I've found and fixed a bug in current opster that occurs because the Option factory (that I added) is not called when the ```cmdtable``` parameter is used with ```dispatch``` or with ```Dispatcher.__init__```. I've added a test that uses the ```dispatch``` function with the ```cmdtable``` parameter that fails under current opster:

$ run oldapi.py cmd2 --verbose 1 2 3

The bug affects all opster versions since the Option factory was introduced. Scripts that will fail because of it are those that use the ```cmdtable``` parameter and that have a function that has both required arguments and ```*varargs``` (the error occurs in ```call_cmd``` only if the function has both).

Sorry about that,
Oscar.