fix TypeError: __init__() got an unexpected keyword argument 'init'

(cherry picked from commit 9e43e3531f7e22159dcc0cd022850c1f6c004538)
This commit is contained in:
shixuantong 2021-11-30 17:14:47 +08:00 committed by openeuler-sync-bot
parent 0d98888297
commit e19d4ae815
2 changed files with 10 additions and 10 deletions

View File

@ -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=''):

View File

@ -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 <shixuantong@huawei.com> - 3.8-3
- fix TypeError: __init__() got an unexpected keyword argument 'init'
* Tue Oct 12 2021 wangqing <wangqing@uniontech.com> - 3.8-2
- fix sosreport exec failed