Fix compatibility with python 3.7
This commit is contained in:
parent
7e6ae28c54
commit
d78166f699
1 changed files with 2 additions and 2 deletions
|
@ -185,8 +185,8 @@ ceph_cmd.append('status')
|
|||
ceph_cmd.append('--format=json')
|
||||
|
||||
# exec command
|
||||
with subprocess.Popen(ceph_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p:
|
||||
output, err = p.communicate()
|
||||
p = subprocess.Popen(ceph_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
output, err = p.communicate()
|
||||
|
||||
if not output:
|
||||
print("UNKNOWN : fail to execute ceph status command")
|
||||
|
|
Loading…
Reference in a new issue