命令通过fabri被挂起执行

2024-04-25 20:41:31 发布

您现在位置:Python中文网/ 问答频道 /正文

当我通过fabric在远程计算机上运行以下命令时,它将被挂起。在

def execute_lmo_scripts():
    print "preparing to execute lmo scripts................"    
    output = run("sudo suwww ; ")  # or this command  sudo("suwww",shell=False)

如果我在远程服务器上手动运行该命令,它可能正在执行。 有谁能指导我解决这个问题吗?在


Tags: torun命令outputexecute远程def计算机
1条回答
网友
1楼 · 发布于 2024-04-25 20:41:31

可能您正在使用run("sudo ..")而不是sudo()sudo命令请求的输入没有被接收,所以它将永远等待。在

相关问题 更多 >