Skip to content

Commit ac2f46f

Browse files
committed
调整
1 parent 21e6215 commit ac2f46f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tools/check_passwd.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def ssh_by_passwd(hostname, username, passwd, cmd):
1919
result = await conn.run(cmd, check=True)
2020
return result.stdout.strip('\n')
2121
#print(result.stdout, end='')
22-
except asyncssh. as err:
22+
except asyncssh.Error as err:
2323
print('访问服务器[%s]失败:\n%s' % (hostname, err))
2424
return 'Fail'
2525

@@ -65,8 +65,8 @@ def main(self):
6565

6666

6767
if __name__ == '__main__':
68-
#hostlist_path = sys.argv[1]
69-
hostlist_path = 'lt_oper'
68+
hostlist_path = sys.argv[1]
69+
# hostlist_path = 'lt_oper'
7070
if os.path.exists(hostlist_path):
7171
overwatch = OVER_WATCH(hostlist_path)
7272
overwatch.main()

0 commit comments

Comments
 (0)