mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
change EOF string, set readline to stdin
This still does not work, sys.stdin will not wait to accept anything because of the way the pipe reads
This commit is contained in:
parent
c5857d13a9
commit
fdbb24eca6
@ -348,8 +348,8 @@ class Shell(object):
|
|||||||
'auto accept run salt-ssh with the -i '
|
'auto accept run salt-ssh with the -i '
|
||||||
'flag:\n{0}').format(stdout)
|
'flag:\n{0}').format(stdout)
|
||||||
return ret_stdout, '', 254
|
return ret_stdout, '', 254
|
||||||
elif stdout and stdout == 'ext_mod':
|
elif stdout and stdout == 'ext_mods':
|
||||||
mods_raw = json.dumps(self.mods, separators=(',',':')) + 'EOF_||'
|
mods_raw = json.dumps(self.mods, separators=(',',':')) + '|_E|0|'
|
||||||
term.sendline(mods_raw)
|
term.sendline(mods_raw)
|
||||||
if not term.isalive():
|
if not term.isalive():
|
||||||
while True:
|
while True:
|
||||||
|
@ -134,9 +134,9 @@ def unpack_thin(thin_path):
|
|||||||
def get_modules():
|
def get_modules():
|
||||||
glob = ''
|
glob = ''
|
||||||
while True:
|
while True:
|
||||||
sys.stdout.write("{0}\next_mods\n".format(OPTIONS.delimiter))
|
sys.stdout.write('ext_mods')
|
||||||
glob += raw_input()
|
glob += sys.stdin.readline()
|
||||||
if glob.endswith('EOF_||'):
|
if glob.endswith('|_E|0|'):
|
||||||
break
|
break
|
||||||
ext_mods = json.loads(glob[:-6])
|
ext_mods = json.loads(glob[:-6])
|
||||||
write_modules(ext_mods)
|
write_modules(ext_mods)
|
||||||
|
Loading…
Reference in New Issue
Block a user