Fix regex for ping result parsing
This commit is contained in:
1 parent
8b2881b0c2
commit
c128712d4d
1 file changed
+1
-1
+1
-1
@@ -632,7 +632,7 @@ class Mininet( object ):
|
||||
# Check for downed link
|
||||
if 'connect: Network is unreachable' in pingOutput:
|
||||
return 1, 0
|
||||
r = r'(\d+) packets transmitted, (\d+) received'
|
||||
r = r'(\d+) packets transmitted, (\d+)( packets)? received'
|
||||
m = re.search( r, pingOutput )
|
||||
if m is None:
|
||||
error( '*** Error: could not parse ping output: %s\n' %
|
||||
|
||||
Reference in new issue
Block a user