def get_options(self):
        """ Get program options.
        """
        super(ScriptBaseWithConfig, self).get_options()

        self.config_dir = os.path.abspath(os.path.expanduser(self.options.config_dir
            or os.environ.get('PYRO_CONFIG_DIR', None)
            or self.CONFIG_DIR_DEFAULT))
        load_config.ConfigLoader(self.config_dir).load(self.OPTIONAL_CFG_FILES + self.options.config_file)
        if self.options.debug:
            config.debug = True

        for key_val in self.options.defines:
            try:
                key, val = key_val.split('=', 1)
            except ValueError, exc:
                raise error.UserError("Bad config override %r (%s)" % (key_val, exc))
            else:
                setattr(config, key, load_config.validate(key, val))