Skip to content

Commit

Permalink
bug: fix ctl process manager initialization non-interactive
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wagner-intevation authored and sebix committed May 31, 2022
1 parent 474467b commit 2efb8c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ CHANGELOG
- CodeQL Github Actions `exponential backtracking on strings` fixed. (PR#2148 by Sebastian Waldbauer, fixes #2138)

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

### Contrib
- 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).
Expand Down
9 changes: 8 additions & 1 deletion intelmq/bin/intelmqctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import textwrap
import traceback
import time
from collections import OrderedDict

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

self.parser = parser
else:
self._processmanager = process_managers()[self._processmanagertype](
self._interactive,
self._runtime_configuration,
self._logger,
self._returntype,
self._quiet
)

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

0 comments on commit 2efb8c2

Please sign in to comment.