Skip to content

Commit cb0d61f

Browse files
author
Sebastian Wagner
committed
BUG: ctl: upgrade-config: remove global from runtime config
before calling the upgrade function, properly remove the global block from the runtime configuration. otherwise the upgrade functions will always fail as they can't find required attributes
1 parent cf87d90 commit cb0d61f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

intelmq/bin/intelmqctl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,12 @@ def upgrade_conf(self, previous=None, dry_run=None, function=None,
16461646
self.logger.info('Successfully wrote initial state file.')
16471647

16481648
runtime = utils.load_configuration(RUNTIME_CONF_FILE)
1649+
try:
1650+
# remove global defaults, handled by 'defaults'
1651+
del runtime['global']
1652+
except KeyError:
1653+
# no global parameters is ok
1654+
pass
16491655
defaults = utils.get_global_settings()
16501656
harmonization = utils.load_configuration(HARMONIZATION_CONF_FILE)
16511657
if dry_run:

0 commit comments

Comments
 (0)