Skip to content

Commit 27aecbe

Browse files
committed
Merge pull request #52 from sigmunau/parse-index-header
Parse the x-etcd-index and x-raft-index headers to ints before storing them
2 parents 0a46888 + 1bdd819 commit 27aecbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/etcd/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def __init__(self, action=None, node=None, prevNode=None, **kwdargs):
4646

4747
def parse_headers(self, response):
4848
headers = response.getheaders()
49-
self.etcd_index = headers.get('x-etcd-index', 1)
50-
self.raft_index = headers.get('x-raft-index', 1)
49+
self.etcd_index = int(headers.get('x-etcd-index', 1))
50+
self.raft_index = int(headers.get('x-raft-index', 1))
5151

5252
def get_subtree(self, leaves_only=False):
5353
"""

0 commit comments

Comments
 (0)