def run(self):
        self.set_arguments()
        args = self.parser.parse_args()
        try:
            # Capture any warning.warn() calls and log them
            logging.captureWarnings(True)
        except AttributeError:
            # Python 2.6 doesn't have captureWarnings()
            pass

        if args.verbose:
            set_logging(level=logging.DEBUG)
        elif args.quiet:
            set_logging(level=logging.WARNING)
        else:
            set_logging(level=logging.INFO)
        try:
            args.func(args)
        except __HOLE__:
            if hasattr(args, 'func'):
                raise
            else:
                self.parser.print_help()
        except KeyboardInterrupt:
            pass
        except Exception as ex:
            if args.verbose:
                raise
            else:
                logger.error("exception caught: %r", ex)
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/cli/main.py/CLI.run