python-etcd
python-etcd copied to clipboard
Fix writing unicode strings as values with python 2.7
Under python 2.7 writing unicode strings as values to etcd fails as follows:
import etcd
client = etcd.Client(host='127.0.0.1', port=2379)
client.write('/test/foo', u'õäö')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
This seems to be all that is needed to fix that.