# HG changeset patch # User Oleg Oshmyan # Date 1298928925 0 # Node ID b7fb64ce03d9c5909194ccf4747355a4b615de61 # Parent bd3fc9017f9171f70ff7a5139d4eb7b6dd3e9a1b Fixed a couple of bugs diff -r bd3fc9017f91 -r b7fb64ce03d9 problem.py --- a/problem.py Mon Feb 28 16:58:16 2011 +0000 +++ b/problem.py Mon Feb 28 21:35:25 2011 +0000 @@ -32,7 +32,7 @@ __all__ = 'Problem', 'TestContext', 'test_context_end', 'TestGroup' def strerror(e): - s = getattr(e, 'strerror') + s = getattr(e, 'strerror', e) if not s: s = str(e) return ' (%s%s)' % (s[0].lower(), s[1:]) if s else '' @@ -170,6 +170,8 @@ verdict = 'cannot read the input file%s' % strerror(sys.exc_info()[1].upstream) except testcases.CannotReadAnswerFile: verdict = 'cannot read the reference output file%s' % strerror(sys.exc_info()[1].upstream) + except testcases.ExceptionWrapper: + verdict = 'unspecified reason [this may be a bug in test.py]%s' % strerror(sys.exc_info()[1].upstream) except testcases.TestCaseNotPassed: verdict = 'unspecified reason [this may be a bug in test.py]%s' % strerror(sys.exc_info()[1]) #except Exception: diff -r bd3fc9017f91 -r b7fb64ce03d9 unix.py --- a/unix.py Mon Feb 28 16:58:16 2011 +0000 +++ b/unix.py Mon Feb 28 21:35:25 2011 +0000 @@ -59,7 +59,7 @@ try: case.process = Popen(*args, **kwargs) except OSError: - raise CannotStartTestee(sys.exc_info()[1]) + raise testcases.CannotStartTestee(sys.exc_info()[1]) case.time_started = clock() if not case.maxtime: while True: