From: Simon Cross Date: Sat, 17 May 2014 14:46:45 +0000 (+0200) Subject: Don't swallow deck load errors when debugging. X-Git-Tag: 0.1~96^2~3 X-Git-Url: https://git.ctpug.org.za/?p=naja.git;a=commitdiff_plain;h=9169ebc25597682c3d543d2519dcf840f3ec9cd3 Don't swallow deck load errors when debugging. --- diff --git a/naja/options.py b/naja/options.py index 19d3e74..7312949 100644 --- a/naja/options.py +++ b/naja/options.py @@ -32,6 +32,8 @@ def load_deck(parser, deck): try: state = GameState.new(deck=deck, max_health=4, wins_required=4) except: + if options.debug: + raise parser.error("Could not load deck %r" % (deck,)) options.game_state = state