Dear list,
I was using ripe.atlas.sagan to parse some ping measurements, one of them looks like the following in JSON format:
rec = {u'af': 4, u'prb_id': 15843, u'result': [{u'error': u'connect failed: Network is unreachable'}], u'avg': -1, u'size': 20, u'from': u'88.174.18.20', u'proto': u'ICMP', u'timestamp': 1470009620, u'dup': 0, u'type': u'ping', u'sent': 0, u'msm_id': 1010, u'fw': 4730, u'max': -1, u'step': 240, u'src_addr': u'192.168.0.22', u'rcvd': 0, u'msm_name': u'Ping', u'lts': 641089, u'dst_name': u'192.228.79.201', u'min': -1, u'dst_addr': u'192.228.79.201'}
Suppose that the above measurement is stored in a variable called rec as a dict, and I parse it using PingResult:
from ripe.atlas.sagan import PingResult
parsed_rec = PingResult(rec)
I was expecting a no-empty string for parsed_rec.error_message, as we can see the measurement result contains an error string, however the parsed_rec.error_message is None.
type(parsed_rec.error_message)
<type 'NoneType’>
Probably I misunderstood some part of the doc:
error_message | str | If the result is an error, the message string is in here |
Could someone please clarify the exact functionality of this error_message?
Many thanks in advance.
Best,
wenqin