From b7e372c3aa2f1da307407397da3b032df4ac4d49 Mon Sep 17 00:00:00 2001 From: razvanm Date: Tue, 19 Jan 2010 00:45:53 +0000 Subject: [PATCH] Fix the issue with tos-deluge not timing out properly. --- support/sdk/python/tos.py | 2 ++ tools/tinyos/misc/tos-deluge | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/support/sdk/python/tos.py b/support/sdk/python/tos.py index 330df0c2..dee4de43 100644 --- a/support/sdk/python/tos.py +++ b/support/sdk/python/tos.py @@ -448,6 +448,8 @@ class AM(SimpleAM): r = super(AM, self).write(packet, amId, timeout, blocking) while not r: r = super(AM, self).write(packet, amId, timeout, blocking, inc=0) + if timeout and not r: + raise Timeout return True diff --git a/tools/tinyos/misc/tos-deluge b/tools/tinyos/misc/tos-deluge index 78b0f662..21d7727f 100755 --- a/tools/tinyos/misc/tos-deluge +++ b/tools/tinyos/misc/tos-deluge @@ -416,7 +416,7 @@ if len(sys.argv) >= 3: try: print "Checking if node is a Deluge T2 base station ..." - ident(timeout=5) + ident(timeout=1) except tos.Timeout: print "ERROR: Timeout. Is the node a Deluge T2 base station?" sys.exit(-1) -- 2.39.2