def parse_args(self, args=None, values=None):
    (options, args) = optparse.OptionParser.parse_args(self, args, values)
    levels = [logging.WARNING, logging.INFO, logging.DEBUG]
    logging.basicConfig(level=levels[min(options.verbose, (len(levels) - 1))])
    return (options, args)
def parse_args(self, args=None, values=None):
    (options, args) = optparse.OptionParser.parse_args(self, args, values)
    levels = [logging.WARNING, logging.INFO, logging.DEBUG]
    logging.basicConfig(level=levels[min(options.verbose, (len(levels) - 1))])
    return (options, args)