From 9bbd161ada27b4bb818d601ed94181b817f9a5dd Mon Sep 17 00:00:00 2001 From: Sérgio M. Basto Date: Feb 03 2020 20:55:55 +0000 Subject: Use mockbuild.util.load_config instead update_config_from_file to simplify the code and make the code more robust, i.e. we don't need to initialize any variables anymore. --- diff --git a/src/FedoraReview/mock.py b/src/FedoraReview/mock.py index 8add839..85a1349 100644 --- a/src/FedoraReview/mock.py +++ b/src/FedoraReview/mock.py @@ -177,11 +177,8 @@ class _Mock(HelpersMixin): # we need disable trace from mock.util to avoid a lot of spurious # messages which are send to stdout logging.getLogger("trace").propagate = 0 - config_opts = mockbuild.util.setup_default_config_opts(None, "unknown", - get_paths()['purelib']) - config_opts['config_paths'] = [] + config_opts = mockbuild.util.load_config(mockdir, config, None, "unknown", get_paths()['purelib']) config_opts['__jinja_expand'] = True - mockbuild.util.update_config_from_file(config_opts, path, None) self.mock_root = config_opts["root"] if Settings.uniqueext: self.mock_root += Settings.uniqueext