HomeClusterLabs Projects

Refactor: python,cts: Fix argument handling for LogWatcher.

Description

Refactor: python,cts: Fix argument handling for LogWatcher.

  • The hosts and kind arguments are required, so make them regular arguments instead of keyword arguments and rearrange all the callers.
  • Raise an actual exception if one of these variables is not set instead of just doing whatever a bare "raise" would do.
  • Don't assert if compiling a regex fails. We don't actually store the compiled regexes. This is just a check to make sure they are well formed. We're not catching the AssertionError anywhere so really all we care about is whether any exception gets raised, which re.compile will do anyway.

Details

Provenance
clumensAuthored on Mar 28 2023, 4:19 PM
Parents
rPf0ae8439352a: Refactor: python: Remove unused variables from watcher.py.
Branches
Unknown
Tags
Unknown