From 9ae06c9ddcd6817e1c5949a4998298815040e58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= Date: Mon, 30 Nov 2015 22:41:04 +0100 Subject: [PATCH] sendGraph: Skip node completely if replied with not_found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- scripts/sendGraph.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/sendGraph.py b/scripts/sendGraph.py index 0647675..7c088c0 100755 --- a/scripts/sendGraph.py +++ b/scripts/sendGraph.py @@ -153,7 +153,12 @@ def get_peers(con, path, nearbyPath=''): res = con.RouterModule_getPeers(path) - if res['error'] != 'none': + if res['error'] == 'not_found': + print('get_peers: node with path {:s} not found, skipping.' + .format(formatted_path)) + return [] + + elif res['error'] != 'none': print('get_peers: failed with error `{:s}` on {:s}, trying again. {:d} tries remaining.' .format(res['error'], formatted_path, retry-i)) elif res['result'] == 'timeout':