From e19d4ae815f5b484d767ffbf96676adc225102e6 Mon Sep 17 00:00:00 2001 From: shixuantong Date: Tue, 30 Nov 2021 17:14:47 +0800 Subject: [PATCH] fix TypeError: __init__() got an unexpected keyword argument 'init' (cherry picked from commit 9e43e3531f7e22159dcc0cd022850c1f6c004538) --- openEuler-add-openEuler-policy.patch | 15 ++++++--------- sos.spec | 5 ++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openEuler-add-openEuler-policy.patch b/openEuler-add-openEuler-policy.patch index bb22f7e..4ec059f 100644 --- a/openEuler-add-openEuler-policy.patch +++ b/openEuler-add-openEuler-policy.patch @@ -5,16 +5,16 @@ Subject: [PATCH] add openEuler policy this patch is based on sos-3.8. --- - sos/policies/openEuler.py | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) + sos/policies/openEuler.py | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) create mode 100644 sos/policies/openEuler.py diff --git a/sos/policies/openEuler.py b/sos/policies/openEuler.py new file mode 100644 -index 0000000..ea65ba2 +index 0000000..b3763a8 --- /dev/null +++ b/sos/policies/openEuler.py -@@ -0,0 +1,30 @@ +@@ -0,0 +1,27 @@ +from __future__ import print_function + +from sos.plugins import RedHatPlugin @@ -27,11 +27,8 @@ index 0000000..ea65ba2 + vendor = "the openEuler Project" + vendor_url = "https://openeuler.org/" + -+ def __init__(self, sysroot=None, init=None, probe_runtime=True, -+ remote_exec=None): -+ super(OpenEulerPolicy, self).__init__(sysroot=sysroot, init=init, -+ probe_runtime=probe_runtime, -+ remote_exec=remote_exec) ++ def __init__(self, sysroot=None): ++ super(OpenEulerPolicy, self).__init__(sysroot=sysroot) + + @classmethod + def check(cls, remote=''): diff --git a/sos.spec b/sos.spec index ad2f972..3694d60 100644 --- a/sos.spec +++ b/sos.spec @@ -2,7 +2,7 @@ Name: sos Version: 3.8 -Release: 2 +Release: 3 Summary: A set of tools to gather troubleshooting information from a system License: GPLv2+ URL: https://github.com/sosreport/sos @@ -47,6 +47,9 @@ install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf %{_mandir}/man5/* %changelog +* Tue Nov 30 2021 shixuantong - 3.8-3 +- fix TypeError: __init__() got an unexpected keyword argument 'init' + * Tue Oct 12 2021 wangqing - 3.8-2 - fix sosreport exec failed -- Gitee