(user_info, arg_addr)
return str(validated_addr)
Parse the receiver's IP address
Parse the receiver's IP address
Parse the receiver s IP address
def _parse_address(user_info, arg_addr):
    """Parse the receiver's IP address"""
    # If the command-line address argument is defined, prioritize it over the
    # address configured on the JSON config file
    if (arg_addr is not None):
        raw_addr = arg_addr
    elif "rx_ip" in user_info["setup"]:
        raw_addr = user_info["setup"]["rx_ip"]
    else:
        raw_addr = defs.default_standalone_ip_addr

    try:
        validated_addr = ip_address(raw_addr)
    except ValueError:
        logger.error("{} is not a valid IPv4 address".format(raw_addr))
        return
    return str(validated_addr)
def _parse_address ( user_info , arg_addr ) : # If the command-line address argument is defined, prioritize it over the # address configured on the JSON config file if ( arg_addr is not None ) : raw_addr = arg_addr elif "rx_ip" in user_info [ "setup" ] : raw_addr = user_info [ "setup" ] [ "rx_ip" ] else : raw_addr = defs . default_standalone_ip_addr try : validated_addr = ip_address ( raw_addr ) except ValueError : logger . error ( "{} is not a valid IPv4 address" . format ( raw_addr ) ) return return str ( validated_addr )