Skip to content

Commit cb06ad5

Browse files
[Edgecore][device][platform] Fixed Semgrep check error.
Signed-off-by: michael_shih <michael_shih@edge-core.com>
1 parent 78d38a9 commit cb06ad5

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

platform/broadcom/sonic-platform-modules-accton/as9736-64d/sonic_platform/component.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,6 @@ def __init__(self, component_index=0):
5555
self.index = component_index
5656
self.name = self.get_name()
5757

58-
def __run_command(self, command):
59-
# Run bash command and print output to stdout
60-
try:
61-
process = subprocess.Popen(
62-
shlex.split(command), stdout=subprocess.PIPE)
63-
while True:
64-
output = process.stdout.readline()
65-
if output == '' and process.poll() is not None:
66-
break
67-
rc = process.poll()
68-
if rc != 0:
69-
return False
70-
except Exception:
71-
return False
72-
return True
73-
7458
def __get_bios_version(self):
7559
# Retrieves the BIOS firmware version
7660
try:

platform/broadcom/sonic-platform-modules-accton/as9736-64d/sonic_platform/helper.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,6 @@ def pci_get_value(self, resource, offset):
3434
status = False
3535
return status, result
3636

37-
def run_command(self, cmd):
38-
status = True
39-
result = ""
40-
try:
41-
p = subprocess.Popen(
42-
cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
43-
raw_data, err = p.communicate()
44-
if err == '':
45-
result = raw_data.strip()
46-
except Exception:
47-
status = False
48-
return status, result
49-
5037
def run_interactive_command(self, cmd):
5138
try:
5239
os.system(cmd)

0 commit comments

Comments
 (0)