diff --git a/questions.py b/questions.py index 4bf44a2..4f17fa1 100644 --- a/questions.py +++ b/questions.py @@ -148,7 +148,7 @@ class QuestionCheckbox(Question): # set defaults if missing self.set_defaults({ 'text': '', - 'correct': [0.0] * n, # useful for questionaries + 'correct': [1.0] * n, # useful for questionaries 'shuffle': True, 'discount': True, 'choose': n, # number of options diff --git a/serve.py b/serve.py index 76436ea..26fd166 100755 --- a/serve.py +++ b/serve.py @@ -16,7 +16,7 @@ import functools import tornado.ioloop import tornado.web import tornado.httpserver -from tornado import template, iostream +from tornado import iostream # this project from learnapp import LearnApp @@ -303,8 +303,8 @@ class QuestionHandler(BaseHandler): # ------------------------------------------------------------------------- def signal_handler(signal, frame): - r = input(' --> Stop webserver? (yes/no) ') - if r in ('yes', 'YES'): + r = input(' --> Stop webserver? (yes/no) ').lower() + if r == 'yes': tornado.ioloop.IOLoop.current().stop() logging.critical('Webserver stopped.') sys.exit(0) -- libgit2 0.21.2