306 + # Send the local and remote endpoint addresses. 307 + local_host, local_port = get("local", (None, None)) 308 + if local_host is not None: 309 + params["local"] = local_host 310 + remote_host, remote_port = get("remote", (None, None)) 311 + if remote_host is not None: 312 + params["remote"] = remote_host
As discussed, get rid of the conditionals here, just try to poke in the IP data since it's mandatory in the API. If it fails, we want to fail early.
Everything else looks tip top!
« Back to merge proposal
306 + # Send the local and remote endpoint addresses.
307 + local_host, local_port = get("local", (None, None))
308 + if local_host is not None:
309 + params["local"] = local_host
310 + remote_host, remote_port = get("remote", (None, None))
311 + if remote_host is not None:
312 + params["remote"] = remote_host
As discussed, get rid of the conditionals here, just try to poke in the IP data since it's mandatory in the API. If it fails, we want to fail early.
Everything else looks tip top!