diff options
author | Joshua Conner <joshua.conner@adcolony.com> | 2014-03-19 15:21:43 -0700 |
---|---|---|
committer | Joshua Conner <joshua.conner@adcolony.com> | 2014-03-19 15:21:43 -0700 |
commit | 985118f00b2727173d863b05901384a9f5190bb0 (patch) | |
tree | 905f90491872b12b5322725500faffbb67ed5e44 /src | |
parent | 232ce2a0ac913613050d2ef105b0e9d3999a2f10 (diff) |
client.write(): only send `value` param if `value` is actually set.
`client.update()` calls to directories were failing because the client sends and empty `value` param with every `client.write()` call. This only sends a `value` param in `client.write()` if `value` is set, which fixes this.
Diffstat (limited to 'src')
-rw-r--r-- | src/etcd/client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/etcd/client.py b/src/etcd/client.py index 4dbd0d6..726963a 100644 --- a/src/etcd/client.py +++ b/src/etcd/client.py @@ -240,9 +240,9 @@ class Client(object): """ key = self._sanitize_key(key) - params = { - 'value': value - } + params = {} + if value: + params['value'] = value if ttl: params['ttl'] = ttl |