# HG changeset patch
# User Oleg Oshmyan <chortos@inbox.lv>
# Date 1302273953 -10800
# Node ID 6d6d2c82e7760e627c548800645622a36b4b3cb4
# Parent  dcabc9eb2fde6b5f1a47d7ef0fb8e14c840ddd15
Absent output files no longer crash Upreckon

diff -r dcabc9eb2fde -r 6d6d2c82e776 testcases.py
--- a/testcases.py	Fri Apr 08 17:56:54 2011 +0300
+++ b/testcases.py	Fri Apr 08 17:45:53 2011 +0300
@@ -328,7 +328,11 @@
 				raise NonZeroExitCode(case.process.returncode)
 			case.has_called_back = True
 			callback()
-			with open(case.problem.config.outname, 'rU') as output:
+			try:
+				output = open(case.problem.config.outname, 'rU')
+			except IOError:
+				raise CannotReadOutputFile(sys.exc_info()[1])
+			with output as output:
 				return case.validate(output)