繁体   English   中英

python中子进程的不确定行为

[英]Uncertain behaviour of subprocess in python

snmpset -v 2c -c private <oid> integer 6
try:
    x = subprocess.check_output(command,shell=True)
except Exception:
    msg = "Some error here"
    exit()

我写了上面的代码是其中一部分的python脚本。 有时它会正确执行,而有时会出现以下错误:

Error in packet.
Reason: noCreation (That table does not support row creation or that object can not ever be created)
Failed object: SNMPv2-SMI::<oid>

我不明白为什么它行为不确定。 谁能帮忙吗? 谢谢!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM