aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debug/testlib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 8ef50e6..692afb6 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -185,6 +185,8 @@ class Openocd(object):
print "OpenOCD Temporary Log File: %s" % logname
def __init__(self, server_cmd=None, config=None, debug=False, timeout=60):
+ self.timeout = timeout
+
if server_cmd:
cmd = shlex.split(server_cmd)
else:
@@ -255,7 +257,7 @@ class Openocd(object):
if not messaged and time.time() - start > 1:
messaged = True
print "Waiting for OpenOCD to start..."
- if (time.time() - start) > timeout:
+ if (time.time() - start) > self.timeout:
raise Exception("ERROR: Timed out waiting for OpenOCD to "
"listen for gdb")
return process