def ParseNewPingMsg(msg):
 parsed = re.match(kNewPingMsgRe, msg)
 if (not parsed):
  return None
 try:
  return (parsed.group(1), parsed.group(2))
 except IndexError as e:
  logging.warning(('RE matched "%s", but extracted wrong numbers of items: %r' % (msg, e)))
  return None

def ParseNewPingMsg ( msg ) : parsed = re . match ( kNewPingMsgRe , msg ) if ( not parsed ) : return None try : return ( parsed . group ( 1 ) , parsed . group ( 2 ) ) except IndexError as e : logging . warning ( ( 'RE matched "%s", but extracted wrong numbers of items: %r' % ( msg , e ) ) ) return None
attempt to parse the message for a ping .