From d454db052131a180dd4f7446a5bcfe245f0cf55d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 5 Feb 2013 21:31:01 -0500 Subject: [PATCH] question: Add a trailing newline to ScriptQuestion scripts --- quizzer/question.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quizzer/question.py b/quizzer/question.py index 9644954..43e72b6 100644 --- a/quizzer/question.py +++ b/quizzer/question.py @@ -132,7 +132,7 @@ class ScriptQuestion (Question): prefix = '{}-'.format(type(self).__name__) if not self.multiline: answer = [answer] - script = '\n'.join(self.setup + answer + self.teardown) + script = '\n'.join(self.setup + answer + self.teardown + ['']) with _tempfile.NamedTemporaryFile( mode='w', prefix='{}script-'.format(prefix)) as tempscript: tempscript.write(script) -- 2.26.2