Skip to content

Commit c236e2e

Browse files
committed
Do not cast the lock sequence to int
Because the etcd devs changed the format of sequence keys in etcd 2.2 (MEH), we will better not make assumptions about the nature of the sequence - we will just assume they are still ordered so that sort will work. Closes: jplana#123
1 parent 0adaa9e commit c236e2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/etcd/lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def lock_key(self):
134134
return self.path + '/' + str(self._sequence)
135135

136136
def _set_sequence(self, key):
137-
self._sequence = int(key.replace(self.path, '').lstrip('/'))
137+
self._sequence = key.replace(self.path, '').lstrip('/')
138138

139139
def _find_lock(self):
140140
if self._sequence:

0 commit comments

Comments
 (0)