diff --git a/database.py b/database.py index c5b7093..cae33e7 100644 --- a/database.py +++ b/database.py @@ -17,7 +17,7 @@ class TextDB(Database): self.filename = filename def getCard(self, name): return self.findCard(name).next() - def findCard(self, name): + def findCard(self, name=None): card = None with open(self.filename, 'r') as f: inRecord = False @@ -63,9 +63,8 @@ class TextDB(Database): if card: # We're done here yield Card(card['name'], card['type'], card['attributes'], card['cost'], card['power'], card['toughness'], card['sets'], card['rarity'], card['text']) - else: - # Prepare to read in the next record - inRecord = False + # Prepare to read in the next record + inRecord = False class WagicDB(Database): def __init__(self, wagicPath):