Skip to content
Snippets Groups Projects
Commit 161e7997 authored by Brian O'Connor's avatar Brian O'Connor
Browse files

Fixing Node.monitor() to read entire prompt marker.

Applying @cdburkard fix to #322
parent a56d9a66
No related branches found
No related tags found
No related merge requests found
......@@ -261,6 +261,9 @@ def monitor( self, timeoutms=None, findPid=True ):
# Look for PID
marker = chr( 1 ) + r'\d+\r\n'
if findPid and chr( 1 ) in data:
# Marker can be read in chunks; continue until all of it is read
while not re.findall( marker, data ):
data += self.read( 1024 )
markers = re.findall( marker, data )
if markers:
self.lastPid = int( markers[ 0 ][ 1: ] )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment