Allow running sss_analyze without Python modules for systemd. Upstream PR: https://github.com/SSSD/sssd/pull/6125 diff --git a/src/tools/analyzer/modules/request.py b/src/tools/analyzer/modules/request.py index b96a23c05..28ac2f194 100644 --- a/src/tools/analyzer/modules/request.py +++ b/src/tools/analyzer/modules/request.py @@ -1,8 +1,6 @@ import re import logging -from sssd.source_files import Files -from sssd.source_journald import Journald from sssd.parser import SubparsersAction from sssd.parser import Option @@ -77,8 +75,10 @@ class RequestAnalyzer: Instantiated source object """ if args.source == "journald": + from sssd.source_journald import Journald source = Journald() else: + from sssd.source_files import Files source = Files(args.logdir) return source @@ -143,7 +143,7 @@ class RequestAnalyzer: self.consumed_logs.append(line.rstrip(line[-1])) else: # files source includes newline - if isinstance(source, Files): + if type(source).__name__ == 'Files': print(line, end='') else: print(line) @@ -225,7 +225,7 @@ class RequestAnalyzer: source.set_component(component, False) self.done = "" for line in self.matched_line(source, patterns): - if isinstance(source, Journald): + if type(source).__name__ == 'Journald': print(line) else: self.print_formatted(line, args.verbose) 2'/>
path: root/bootstrap
AgeCommit message (Expand)Author
2024-04-19maint: Generate doc/version[-LANG].texi using `mdate-from-git.scm'....This replaces Automake's `build-aux/mdate-sh' with our own `build-aux/mdate-from-git.scm' to use reproducible timestamps from Git instead. * build-aux/mdate-from-git.scm: New script. * bootstrap: Use it to replace build-aux/mdate-sh. * Makefile.am (EXTRA_DIST): Add it. Change-Id: I17d0a7de9ffea397129c0db1728f86e28a4e245f Janneke Nieuwenhuizen