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

Applying @cdburkard fix to #322
This commit is contained in:
Brian O'Connor
2014-08-14 00:18:37 -07:00
committed by cody burkard
parent 7e9d3f2b50
commit db0f36f431
+3
View File
@@ -261,6 +261,9 @@ class Node( object ):
# 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: ] )