Skip to content

Commit 2efb8c2

Browse files
wagner-intevationsebix
authored andcommitted
bug: fix ctl process manager initialization non-interactive
if the intelmq controller class is initiated non-interactively the process manager instance was not initiated this caused the intelmqdump tool to crash when retrieving the status of a bot fixes #2188
1 parent 474467b commit 2efb8c2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ CHANGELOG
104104
- CodeQL Github Actions `exponential backtracking on strings` fixed. (PR#2148 by Sebastian Waldbauer, fixes #2138)
105105

106106
### Tools
107+
- `intelmqctl`: fix process manager initialization if run non-interactively, as intelmqdump does it (PR#2189 by Sebastian Wagner, fixes 2188).
107108

108109
### Contrib
109110
- logrotate: Move compress and ownership rules to the IntelMQ-blocks to prevent that they apply to other files (PR#2111 by Sebastian Wagner, fixes #2110).

intelmq/bin/intelmqctl.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import textwrap
1616
import traceback
1717
import time
18-
from collections import OrderedDict
1918

2019
import pkg_resources
2120
from ruamel.yaml import YAML
@@ -374,6 +373,14 @@ def __init__(self, interactive: bool = False, returntype: ReturnType = ReturnTyp
374373
parser_debug.set_defaults(func=self.debug)
375374

376375
self.parser = parser
376+
else:
377+
self._processmanager = process_managers()[self._processmanagertype](
378+
self._interactive,
379+
self._runtime_configuration,
380+
self._logger,
381+
self._returntype,
382+
self._quiet
383+
)
377384

378385
def load_defaults_configuration(self, silent=False):
379386
for option, value in utils.get_global_settings().items():

0 commit comments

Comments
 (0)