Commit 5ce21bfb authored by ibuler's avatar ibuler

[Bugfix] 修改sftp的异常

parent 797d6c3a
......@@ -108,7 +108,7 @@ class SFTPServer(paramiko.SFTPServerInterface):
self._sftp = {}
def get_host_sftp(self, host, su):
asset = self.hosts.get(host)['asset']
asset = self.hosts.get(host, {}).get('asset')
system_user = self.get_host_system_users(host, only_name=False).get(su)
if not asset or not system_user:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment