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 '
|
||||
'flag:\n{0}').format(stdout)
|
||||
return ret_stdout, '', 254
|
||||
elif stdout and stdout == 'ext_mod':
|
||||
mods_raw = json.dumps(self.mods, separators=(',',':')) + 'EOF_||'
|
||||
elif stdout and stdout == 'ext_mods':
|
||||
mods_raw = json.dumps(self.mods, separators=(',',':')) + '|_E|0|'
|
||||
term.sendline(mods_raw)
|
||||
if not term.isalive():
|
||||
while True:
|
||||
|
@ -134,9 +134,9 @@ def unpack_thin(thin_path):
|
||||
def get_modules():
|
||||
glob = ''
|
||||
while True:
|
||||
sys.stdout.write("{0}\next_mods\n".format(OPTIONS.delimiter))
|
||||
glob += raw_input()
|
||||
if glob.endswith('EOF_||'):
|
||||
sys.stdout.write('ext_mods')
|
||||
glob += sys.stdin.readline()
|
||||
if glob.endswith('|_E|0|'):
|
||||
break
|
||||
ext_mods = json.loads(glob[:-6])
|
||||
write_modules(ext_mods)
|
||||
|
Loading…
Reference in New Issue
Block a user