fixed issue with regex matching

This commit is contained in:
cody burkard
2014-07-25 03:41:13 -07:00
parent 2973798ca1
commit 859bfea502
+2
View File
@@ -261,6 +261,8 @@ class Node( object ):
# Look for PID # Look for PID
marker = chr( 1 ) + r'\d+\r\n' marker = chr( 1 ) + r'\d+\r\n'
if findPid and chr( 1 ) in data: if findPid and chr( 1 ) in data:
while not re.findall( marker, data ):
data += self.read( 1024 )
markers = re.findall( marker, data ) markers = re.findall( marker, data )
if markers: if markers:
self.lastPid = int( markers[ 0 ][ 1: ] ) self.lastPid = int( markers[ 0 ][ 1: ] )