minor bug fixes, add new tags, add bulk using file

This commit is contained in:
2025-05-09 17:44:29 -03:00
parent 582459d6d3
commit e2e4c9bfe7
4 changed files with 36 additions and 7 deletions

View File

@ -2646,6 +2646,8 @@ class node:
attempts = 1
while attempts <= max_attempts:
child = pexpect.spawn(cmd)
if isinstance(self.tags, dict) and self.tags.get("console"):
child.sendline()
if debug:
print(cmd)
self.mylog = io.BytesIO()
@ -2699,6 +2701,12 @@ class node:
else:
break
if isinstance(self.tags, dict) and self.tags.get("post_connect_commands"):
cmds = self.tags.get("post_connect_commands")
commands = [cmds] if isinstance(cmds, str) else cmds
for command in commands:
child.sendline(command)
sleep(1)
child.readline(0)
self.child = child
return True</code></pre>