class CmdNotFoundException(Exception): pass class CommandException(Exception): def __init__(self, message, print_usage=True): Exception.__init__(self, message) self.print_usage = print_usage