• L
    utils.network: Also check for UDP protocols in is_port_free · d5611a80
    Lukáš Doktor 提交于
    Binding port won't complain when port already opened for UDP packets and
    we are trying to bind it for TCP packets. Let's do a combination.
    
    Note I also tried:
    
        tuple(getattr(socket, _) for _ in dir(socket)
              if _.startswith('SOCK_')
    
    to cover all of the protocols, but all the time they just reported
    incorrect combination so let's just stick with the most common ones.
    Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
    d5611a80
test_utils_network.py 3.2 KB