Fixing Blind with Anger having the whole mtgdata.txt as Oracle Text

Fixing issue where if Name isn't found in mtgdata.txt an error is written and the card is skipped
This commit is contained in:
Sol
2011-08-28 21:58:05 +00:00
parent f1191965ee
commit 25a0db7fd0
2 changed files with 6 additions and 1 deletions

View File

@@ -46,6 +46,11 @@ for root, dirnames, filenames in os.walk(folder):
name = line.replace('Name:', '')
search = '\n%s\n' % name
found = mtgData.find(search)
if found == -1:
err.write(cleanName + '... NOT FOUND\n')
continue
endFound = mtgData.find('\n\n', found)
block = mtgData[found+1:endFound]