| |
@@ -167,7 +167,9 @@
|
| |
content = re.sub(r'include\((.*)\)',
|
| |
r'exec(open(\g<1>).read(), {}, locals())',
|
| |
content)
|
| |
- config = compile(content, path, 'exec')
|
| |
+ content = [line for line in content.splitlines() if
|
| |
+ line.find("config_opts['root']") >= 0]
|
| |
+ config = compile(content[0], path, 'exec')
|
| |
exec(config)
|
| |
self.mock_root = config_opts['root']
|
| |
if Settings.uniqueext:
|
| |
Commit https://pagure.io/FedoraReview/c/23e1e504032f83772cb84111a285053fbee1dd35?branch=devel introducing a bug in which
exec(config)
fails to parse the config file when the config containsconfig_opts
sub-dictionnaries, for example:fails because
plugin_conf
andmacros
have not been declared beforehand.Since we only need
config_opts['root']
, this PR extracts that line from the config and pass only that line to exec.