From 7613bfcab9d21609cf6a8affce0d97cf283fbb4b Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 18 Jul 2017 18:27:08 -0400 Subject: [PATCH] Set default value for count so it can be left out of json files --- SotMDeckBuilder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SotMDeckBuilder.py b/SotMDeckBuilder.py index 2692d9f..070b586 100755 --- a/SotMDeckBuilder.py +++ b/SotMDeckBuilder.py @@ -182,7 +182,7 @@ def makeJson(deckJson, imgWidth, outfile): cardNum += 2 for card in deckJson['deck']: - for i in range(0, card['count']): + for i in range(0, card.get('count', 1)): outJson['ObjectStates'][0]['DeckIDs'].append(cardNum) # add a card object thing for each card, and give it a name