If the peer could not be reached, RoundtripUsec contains "N/A" which we
will now catch and return nothing instead.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
@property
def roundtrip(self):
- return int(self.data.RoundtripUsec) / 1000
+ try:
+ return int(self.data.RoundtripUsec) / 1000
+ except ValueError:
+ pass
class OutboundRegistration(misc.Object):
{# Latency #}
<td class="has-text-right">
- {{ _("%.2fms") % r.roundtrip }}
+ {% if r.roundtrip %}
+ {{ _("%.2fms") % r.roundtrip }}
+ {% else %}
+ {{ _("N/A") }}
+ {% end %}
</th>
</tr>
{% end %}