print registered questions if debug

This commit is contained in:
Frank Becker 2011-11-19 00:01:04 +01:00
parent 6f9b4678e4
commit bb865905bf
2 changed files with 9 additions and 6 deletions

View File

@ -22,9 +22,9 @@ answers:
tier: 1
game_round: 1
media:
- aaa
- bbb
- ccc
- pix/question1.png
- pix/question1_big.png
- videos/question1.webm
--- !Question
question: What are users in Facebook called?
@ -36,6 +36,6 @@ answers:
tier: 2
game_round: 1
media:
- aaa
- bbb
- ccc
- pix/facebook.jpg
- pix/facebook-jail.png
- videos/faschistbook.webm

View File

@ -13,6 +13,7 @@ readeable format assuming yaml is more human readable
TODO:
* Add own constructor to Question() / nice to have
* Deal with media files
* Fix to output only questions per round as json
"""
__author__ = "Frank Becker <fb@alien8.de>"
@ -178,6 +179,8 @@ def main():
# yaml.add_constructor
Question.register_question(q)
questions.append(q)
if options.debug:
print Question.registered_questions
print json.dumps([q.as_dict for q in questions], indent=2)
if __name__ == '__main__':