Skip to content

Commit

Permalink
Fix a stack in "nodemgr events" caused by key deletion events format
Browse files Browse the repository at this point in the history
  • Loading branch information
cvaroqui committed May 3, 2018
1 parent 4cc375b commit 6f432af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/node.py
Expand Up @@ -2981,8 +2981,12 @@ def _events(self, nodename=None):
sys.stdout.flush()
else:
print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"))
for key, val in msg["data"]:
line = " %s => %s" % (".".join(key), val)
for event in msg["data"]:
try:
key, val = event
line = " %s => %s" % (".".join(key), val)
except ValueError:
line = " %s deleted" % ".".join(event[0])
print(line)
sys.stdout.flush()

Expand Down

0 comments on commit 6f432af

Please sign in to comment.