mirror of https://github.com/Aidaho12/haproxy-wi
get_pty for paramiko
fix when u use cloud machines with the restricted permission while working on system files.pull/50/head
parent
3e87f8f862
commit
a879871cf6
|
@ -373,7 +373,7 @@ def check_haproxy_config(serv):
|
|||
commands = [ "haproxy -q -c -f %s" % sql.get_setting('haproxy_config_path') ]
|
||||
ssh = ssh_connect(serv)
|
||||
for command in commands:
|
||||
stdin , stdout, stderr = ssh.exec_command(command)
|
||||
stdin , stdout, stderr = ssh.exec_command(comman, get_pty=True)
|
||||
if not stderr.read():
|
||||
return True
|
||||
else:
|
||||
|
@ -407,7 +407,7 @@ def ssh_command(serv, commands, **kwargs):
|
|||
|
||||
for command in commands:
|
||||
try:
|
||||
stdin, stdout, stderr = ssh.exec_command(command)
|
||||
stdin, stdout, stderr = ssh.exec_command(command,get_pty=True)
|
||||
except:
|
||||
continue
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3.5
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-"
|
||||
import html
|
||||
import cgi
|
||||
|
|
Loading…
Reference in New Issue