|
@@ -270,11 +270,8 @@ class oa2RtspStartView(TemplateView):
|
|
back = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).\
|
|
back = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).\
|
|
communicate(timeout=10)
|
|
communicate(timeout=10)
|
|
except Exception as e:
|
|
except Exception as e:
|
|
- return '111'
|
|
|
|
- return repr(e)
|
|
|
|
return False
|
|
return False
|
|
else:
|
|
else:
|
|
- return '222'
|
|
|
|
return str(back[0].decode())+str(back[1].decode())
|
|
return str(back[0].decode())+str(back[1].decode())
|
|
print("back0----", back[0].decode()) # 注意需要进行解码操作,默认输出的是字节
|
|
print("back0----", back[0].decode()) # 注意需要进行解码操作,默认输出的是字节
|
|
print("back1----", back[1].decode()) # back是一个元祖,可以通过元祖取值的方式获取结果
|
|
print("back1----", back[1].decode()) # back是一个元祖,可以通过元祖取值的方式获取结果
|