diff options
Diffstat (limited to 'examples/dynamic_commands.py')
| -rwxr-xr-x | examples/dynamic_commands.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/dynamic_commands.py b/examples/dynamic_commands.py index 35c2cd42..aca370ec 100755 --- a/examples/dynamic_commands.py +++ b/examples/dynamic_commands.py @@ -16,6 +16,7 @@ CATEGORY = 'Dynamic Commands' class CommandsInLoop(cmd2.Cmd): """Example of dynamically adding do_* commands.""" + def __init__(self): # Add dynamic commands before calling cmd2.Cmd's init since it validates command names for command in COMMAND_LIST: |
