python-etcd
python-etcd copied to clipboard
AUTH : Fix version check to avoid crashing on API detection through v…
Dear Maintainer,
I've ecountered an error using the GIT version of Etcd, you get versions such as "3.2.0-rc.1+git"
Previous code led to this error:
"/usr/lib/python2.7/site-packages/etcd/auth.py", line 25, in legacy_api
major, minor, _ = map(int, self.client.version.split('.'))
ValueError: invalid literal for int() with base 10: '0-rc'
This proposes a (very) simple fix by only keeping the beginning of the version string.
Regards,
Jean-Baptiste.