Skip to content

Client.write() returns a bogus result when updating a dir in etcd > 0.2 #38

@lavagetto

Description

@lavagetto

Etcd v 0.3 introduced the "prevNode" property that is handled strangely for dirs; if we update a dir we obtain a strange result returned:

c = etcd.Client()
r = c.write('/foo', None, dir=True, ttl=50)
print(r.dir) #True
r2 = c.write('/foo', None, dir=True, ttl=120, prevExist=True)
print(r2.dir) #False

We should somehow use what is in prevNode to understand if the node is a dir.

I strongly suspect this is not the only case in which the write() response does something funny.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions