From: razvanm Date: Tue, 19 Jan 2010 00:45:53 +0000 (+0000) Subject: Fix the issue with tos-deluge not timing out properly. X-Git-Tag: rc_6_tinyos_2_1_1~53 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=b7e372c3aa2f1da307407397da3b032df4ac4d49 Fix the issue with tos-deluge not timing out properly. --- 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)