projects
/
quizzer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90dd6fc
)
question: Add a trailing newline to ScriptQuestion scripts
author
W. Trevor King
<wking@tremily.us>
Wed, 6 Feb 2013 02:31:01 +0000
(21:31 -0500)
committer
W. Trevor King
<wking@tremily.us>
Wed, 6 Feb 2013 02:31:01 +0000
(21:31 -0500)
quizzer/question.py
patch
|
blob
|
history
diff --git
a/quizzer/question.py
b/quizzer/question.py
index 96449541e229bb0c410915c0db52e067fd1123e2..43e72b6dd79254365df4d2996410830afd2e2f9e 100644
(file)
--- 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)