Description:
fix bug: test_request: read empty output file
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@102 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r49:5bcf18c63ae4 - - 1 file changed: 3 inserted, 0 deleted
@@ -31,6 +31,9 | |||||
|
31 | end |
|
31 | end |
|
32 | if test_request.output_file_name!=nil |
|
32 | if test_request.output_file_name!=nil |
|
33 | data = File.open(test_request.output_file_name).read(2048) |
|
33 | data = File.open(test_request.output_file_name).read(2048) |
|
|
34 | + if data==nil | ||
|
|
35 | + data="" | ||
|
|
36 | + end | ||
|
34 | send_data(data, |
|
37 | send_data(data, |
|
35 | {:filename => 'output.txt', |
|
38 | {:filename => 'output.txt', |
|
36 | :type => 'text/plain'}) |
|
39 | :type => 'text/plain'}) |
You need to be logged in to leave comments.
Login now