sos/Fix-sos-command-failed-in-sos-4.0.patch
wei dong daff78541f Fix sos command failed in sos 4.0
Signed-off-by: wei dong <weidong@uniontech.com>
2022-02-22 10:29:55 +08:00

47 lines
1.4 KiB
Diff

From e024511400e23d28b47c25df79ab162d8e1991ae Mon Sep 17 00:00:00 2001
From: wei dong <weidong@uniontech.com>
Date: Tue, 22 Feb 2022 10:24:18 +0800
Subject: [PATCH] Fix sos command failed in sos 4.0
Signed-off-by: wei dong <weidong@uniontech.com>
---
sos/policies/uniontech.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/sos/policies/uniontech.py b/sos/policies/uniontech.py
index cd30136..535335b 100644
--- a/sos/policies/uniontech.py
+++ b/sos/policies/uniontech.py
@@ -1,6 +1,3 @@
-from __future__ import print_function
-
-from sos.plugins import RedHatPlugin
from sos.policies.redhat import RedHatPolicy, OS_RELEASE
import os
@@ -10,11 +7,18 @@ class UnionTechPolicy(RedHatPolicy):
vendor = "the UnionTech Project"
vendor_url = "https://www.chinauos.com/"
- def __init__(self, sysroot=None):
- super(UnionTechPolicy, self).__init__(sysroot=sysroot)
+ def __init__(self, sysroot=None, init=None, probe_runtime=True,
+ remote_exec=None):
+ super(UnionTechPolicy, self).__init__(sysroot=sysroot, init=init,
+ probe_runtime=probe_runtime,
+ remote_exec=remote_exec)
@classmethod
- def check(cls):
+ def check(cls, remote=''):
+
+ if remote:
+ return cls.distro in remote
+
if not os.path.exists(OS_RELEASE):
return False
--
2.27.0