python-memcached
python-memcached copied to clipboard
Bugs in Client constructor when the servers parameter is a string, and the set_servers docstring is wrong
See here https://github.com/linsomniac/python-memcached/blob/master/memcache.py#L280. The docstring indicates that when a string is passed in for the servers parameter, the client will treat it as a single host.
Instead what actually happens, is that it will iterate over the string and attempt to create a host for every letter in the string. Then one of two things is possible:
- If the host name contains a port, the constructor will fail on trying to parse the ':' separator.
- If the host name does not contain a port, the constructor will succeed, but set and get calls will run.