Actually, that one-liner works but is too lax due to not paying attention to operator precedence. It should be:
if server.host in destinations or "%s:%s" % (server.host, server.port) in destinations:
instead of :
if server.host or "%s:%s" % (server.host, server.port) in destinations:
Actually, that one-liner works but is too lax due to not paying attention to operator precedence. It should be:
if server.host in destinations or "%s:%s" % (server.host, server.port) in destinations:
instead of :
if server.host or "%s:%s" % (server.host, server.port) in destinations: