From eeee15c738878e314278225264b67449c9b71e53 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Thu, 1 Jul 2010 17:30:45 -0400 Subject: [PATCH] Return None if card could not be found in the database --- database.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/database.py b/database.py index 8681197..10f5018 100644 --- a/database.py +++ b/database.py @@ -56,6 +56,8 @@ class TextDB(Database): else: # Prepare to read in the next record inRecord = False + if not card: + return None return Card(card['name'], card['type'], card['attributes'], card['cost'], card['power'], card['toughness'], card['rarity']) if __name__ == '__main__':