From: W. Trevor King Date: Wed, 6 Feb 2013 02:31:01 +0000 (-0500) Subject: question: Add a trailing newline to ScriptQuestion scripts X-Git-Tag: v0.1~37 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d454db052131a180dd4f7446a5bcfe245f0cf55d;p=quizzer.git question: Add a trailing newline to ScriptQuestion scripts --- 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)