diff --git a/etcd3/transactions.py b/etcd3/transactions.py index 5603d9b4..1a5bf115 100644 --- a/etcd3/transactions.py +++ b/etcd3/transactions.py @@ -86,6 +86,12 @@ def build_compare(self, compare): compare.mod_revision = int(self.value) +class Lease(BaseCompare): + def build_compare(self, compare): + compare.target = etcdrpc.Compare.LEASE + compare.lease = int(self.value) + + class Put(object): def __init__(self, key, value, lease=None, prev_kv=False): self.key = key