Skip to content
Snippets Groups Projects
Commit 3fac5a43 authored by Brandon Heller's avatar Brandon Heller
Browse files

Handle ping output for paused hosts

parent 07aad110
No related branches found
No related tags found
No related merge requests found
......@@ -383,12 +383,15 @@ def run( self, test, **params ):
@staticmethod
def _parsePing( pingOutput ):
"Parse ping output and return packets sent, received."
# Check for downed link
if 'connect: Network is unreachable' in pingOutput:
return (1, 0)
r = r'(\d+) packets transmitted, (\d+) received'
m = re.search( r, pingOutput )
if m == None:
error( '*** Error: could not parse ping output: %s\n' %
pingOutput )
exit( 1 )
return (1, 0)
sent, received = int( m.group( 1 ) ), int( m.group( 2 ) )
return sent, received
......
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