changeset 54:1914ae9cfdce

Bug fixes
author Oleg Oshmyan <chortos@inbox.lv>
date Mon, 20 Dec 2010 22:44:34 +0200
parents 394aec9712b6
children c726235e49ee
files files.py testcases.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/files.py	Mon Dec 20 17:26:34 2010 +0200
+++ b/files.py	Mon Dec 20 22:44:34 2010 +0200
@@ -241,7 +241,7 @@
 			else:
 				return contextlib.closing(file)
 		else:
-			return open(self.real_path)
+			return open(self.real_path, 'rU')
 	
 	def copy(self, target):
 		if self.archive:
--- a/testcases.py	Mon Dec 20 17:26:34 2010 +0200
+++ b/testcases.py	Mon Dec 20 22:44:34 2010 +0200
@@ -355,7 +355,7 @@
 		case.open_infile()
 		case.time_started = None
 		if case.problem.config.stdio:
-			if options.erase and not case.validator and case.problem.config.inname:
+			if options.erase and not case.validator or not case.problem.config.inname:
 				# TODO: re-use the same file name if possible
 				# FIXME: 2.5 lacks the delete parameter
 				with tempfile.NamedTemporaryFile(delete=False) as f: