Return None if card could not be found in the database

This commit is contained in:
Correl Roush 2010-07-01 17:30:45 -04:00
parent 49bf2a9d0c
commit eeee15c738

View file

@ -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__':