Skip to content

Commit

Permalink
Update redfish_api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pettershao-ragilenetworks authored Jan 20, 2023
1 parent 4263480 commit 8dd24a8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import traceback
import datetime
import shlex
import os
import ssl
import subprocess
Expand Down Expand Up @@ -50,7 +51,7 @@ def get_full_url(self, url):

def _exec_cmd(self, cmd):
self.redfish_log_debug("Cmd: %s" % cmd)
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen(shlex.split(cmd), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p.wait()
self.redfish_log_debug("Cmd return: %d" % p.returncode)
str_stdout = p.stdout.read().decode('utf-8')
Expand Down

0 comments on commit 8dd24a8

Please sign in to comment.