You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have code that subclasses pexpect.spawn. In that code, we loop if the underlying spawned process doesn't connect properly the first time. In that case we call self.close() from the subclass and then loop back to calling the superclass's __init__ method again, where we encounter this:
Traceback (most recent call last):
File "/opt/SUNWldm/test/memblocks.py", line 241, in testmemblocks
self.do_testmemblocks()
File "/opt/SUNWldm/test/memblocks.py", line 338, in do_testmemblocks
ldom.id - 1, self)
File "/opt/SUNWldm/test/lib/ldomconsole.py", line 115, in __init__
encoding='utf-8', codec_errors='ignore')
File "/usr/lib/python3.7/vendor-packages/pexpect/pty_spawn.py", line 205, in _
_init__
self._spawn(command, args, preexec_fn, dimensions)
File "/usr/lib/python3.7/vendor-packages/pexpect/pty_spawn.py", line 283, in _
spawn
assert self.pid is None, 'The pid member must be None.'
AssertionError: The pid member must be None.
If I explicitly set self.pid to None in my code after calling self.close(), the problem goes away. Shouldn't spawn.close() do that?
The text was updated successfully, but these errors were encountered:
Hi, I have code that subclasses pexpect.spawn. In that code, we loop if the underlying spawned process doesn't connect properly the first time. In that case we call self.close() from the subclass and then loop back to calling the superclass's
__init__
method again, where we encounter this:If I explicitly set self.pid to None in my code after calling self.close(), the problem goes away. Shouldn't spawn.close() do that?
The text was updated successfully, but these errors were encountered: