Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions etcd
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ try:
except ImportError:
requests_found = False


def main():
stack = []

Expand Down Expand Up @@ -134,7 +133,7 @@ def main():
prev_value = client.get(key).value
except requests.ConnectionError:
module.fail_json(msg="Can not connect to target.")
except KeyError:
except (KeyError, etcd.EtcdKeyNotFound):
prev_value = None
except etcd.EtcdException as err:
module.fail_json(msg="Etcd error: %s" % err)
Expand Down Expand Up @@ -164,7 +163,7 @@ def main():
client.get(d).value
except requests.ConnectionError:
module.fail_json(msg="Can not connect to target.")
except KeyError:
except (KeyError, etcd.EtcdKeyNotFound):
client.write(d, '', dir=True)
prev_value = None
except etcd.EtcdException as err:
Expand Down