def _configure_base(module, base, conf_file, disable_gpg_check, installroot='/'):
 conf = base.conf
 conf.debuglevel = 0
 conf.gpgcheck = (not disable_gpg_check)
 conf.assumeyes = True
 conf.installroot = installroot
 if conf_file:
  if (not os.access(conf_file, os.R_OK)):
   module.fail_json(msg='cannot read configuration file', conf_file=conf_file)
  else:
   conf.config_file_path = conf_file
 conf.read()

def _configure_base ( module , base , conf_file , disable_gpg_check , installroot = '/' ) : conf = base . conf conf . debuglevel = 0 conf . gpgcheck = ( not disable_gpg_check ) conf . assumeyes = True conf . installroot = installroot if conf_file : if ( not os . access ( conf_file , os . R_OK ) ) : module . fail_json ( msg = 'cannot read configuration file' , conf_file = conf_file ) else : conf . config_file_path = conf_file conf . read ( )
configure the dnf base object .