Skip to content

Commit 0a5d46a

Browse files
committed
Fix static subprocess
Signed-off-by: maipbui <[email protected]>
1 parent cebc440 commit 0a5d46a

File tree

1 file changed

+1
-2
lines changed
  • device/celestica/x86_64-cel_e1031-r0/sonic_platform

1 file changed

+1
-2
lines changed

device/celestica/x86_64-cel_e1031-r0/sonic_platform/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class Common:
2525

2626
SET_METHOD_IPMI = 'ipmitool'
2727
NULL_VAL = 'N/A'
28-
HOST_CHK_CMD = "docker > /dev/null 2>&1"
2928
REF_KEY = '$ref:'
3029

3130
def __init__(self, conf=None):
@@ -196,7 +195,7 @@ def write_txt_file(self, file_path, value):
196195
return True
197196

198197
def is_host(self):
199-
return subprocess.run(split(self.HOST_CHK_CMD)).returncode == 0
198+
return subprocess.run('docker', stdout=None, stderr=None).returncode == 0
200199

201200
def load_json_file(self, path):
202201
"""

0 commit comments

Comments
 (0)