Commit cdd6f340 authored by Vaclav Sraier's avatar Vaclav Sraier Committed by Vaclav Sraier
Browse files

Netmetr measure function: simplify

parent 6493b200
Pipeline #69962 failed with stages
in 6 minutes and 25 seconds
......@@ -102,14 +102,10 @@ class Netmetr:
# if all of them failed, try running the unpreferred option
if not measured:
p = None
if protocol_mode == Mode.prefer_4:
p = Protocol.IPv6
if protocol_mode == Mode.prefer_6:
p = Protocol.IPv4
if p is not None:
_, result[p] = self._run_measurement(p)
_, result[Protocol.IPv6] = self._run_measurement(Protocol.IPv6)
elif protocol_mode == Mode.prefer_6:
_, result[Protocol.IPv4] = self._run_measurement(Protocol.IPv4)
return result
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment