Popen No such file or directory 错误

  File "/data/msalt/module/default/game/common_tools.py", line 92, in reload_config
    stderr=PIPE, env={"PATH": '', "HOME": "/root"})
  File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

proc = Popen(["/data/%s_%s_%s/server/meectl " % (project, agent, sid), "reload_config", config], stdout=PIPE,
                         stderr=PIPE, env={"PATH": path, "HOME": "/root"})

用Popen命令时,参数不能有多余的空格,例如meectl后面多了个空格,就会报上面的错误。

posted @ 2014-07-21 19:28  Xjng  阅读(1626)  评论(0编辑  收藏  举报