From 7b18c0df5d1948a5910fc81bdfe874c2da143e76 Mon Sep 17 00:00:00 2001 From: Mac Mollison Date: Fri, 26 Mar 2010 17:43:16 -0400 Subject: Non-eligible job error message --- unit_trace/gedf_test.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'unit_trace/gedf_test.py') diff --git a/unit_trace/gedf_test.py b/unit_trace/gedf_test.py index f3088ac..cf66142 100644 --- a/unit_trace/gedf_test.py +++ b/unit_trace/gedf_test.py @@ -9,6 +9,7 @@ ############################################################################### import copy +import sys ############################################################################### @@ -58,7 +59,13 @@ def gedf_test(stream): # Move a Job from the eligible queue to on_cpu elif record.type_name == 'switch_to': pos = _find_job(record,eligible) - job = eligible[pos] + try: + job = eligible[pos] + except TypeError: + msg = "Event %d tried to switch to a job that was not eligible\n" + msg = msg % (record.id) + sys.stderr.write(msg) + exit() del eligible[pos] on_cpu.append(job) -- cgit v1.2.2