def main(__interactive__: bool, force: bool) -> None: """ Updates the configuration if the program is to be run interactively, then install necessary items :param __interactive__: if the config has to be updated :param force: True to force reinstall of the programs, else will only install the ones that are not installed """ if __interactive__ and update.update(): logging.error("An error occurred, could not finish configuration") return 1 try: install(force) setup_coredumps() hooks.load_plugins() hooks.configure(force) except (exceptions.InstallationErrorException, exceptions.DistributionNotSupportedException) as exception: logging.error(exception) logging.error("Configure script failed. Please rerun it after correcting errors. You can add --default in order" " to skip questions") return 1 finally: logging.verbose("Cleaning environment")
def main(__interactive__: bool, force: bool) -> None: """ Updates the configuration if the program is to be run interactively, then install necessary items :param __interactive__: if the config has to be updated :param force: True to force reinstall of the programs, else will only install the ones that are not installed """ if __interactive__ and update.update(): logging.error("An error occurred, could not finish configuration") return 1 try: install(force) setup_coredumps() hooks.load_plugins() hooks.configure(force) except (exceptions.InstallationErrorException, exceptions.DistributionNotSupportedException) as exception: logging.error(exception) logging.error( "Configure script failed. Please rerun it after correcting errors. You can add --default in order" " to skip questions") return 1 finally: logging.verbose("Cleaning environment")
def pre_run(self): """ Sets up coredumps options before the run """ setup_coredumps() change_coredump_filter()