Python TypeError:put()获取了意外的关键字参数';使用sudo';

Python TypeError:put()获取了意外的关键字参数';使用sudo';,python,fabric,Python,Fabric,我运行以下命令: c = Connection('sid', config=config) c.put("local", "/etc/nginx/sites-available/addr", use_sudo=True) 我明白了 我不能用fabric core做这件事吗?简短的回答是否定的。连接。put是关于传输。put,和传输。put:(1)本地,(2)远程和(3)保存模式 ~/.virtualenvs/fabric/lib/python3.7/site-packages/fabr

我运行以下命令:

 c = Connection('sid', config=config) 
 c.put("local", "/etc/nginx/sites-available/addr", use_sudo=True) 
我明白了


我不能用fabric core做这件事吗?

简短的回答是否定的。
连接。put
是关于
传输。put
,和
传输。put
:(1)
本地
,(2)
远程
和(3)
保存模式

~/.virtualenvs/fabric/lib/python3.7/site-packages/fabric/connection.py in put(self, *args, **kwargs)
    784         .. versionadded:: 2.0
    785         """
--> 786         return Transfer(self).put(*args, **kwargs)
    787 
    788     # TODO: yield the socket for advanced users? Other advanced use cases

TypeError: put() got an unexpected keyword argument 'use_sudo'