- Fixing the two scripts that were broken because they were expecting an End clause in card scripts

This commit is contained in:
Sol
2013-02-26 01:25:18 +00:00
parent fb8398ccbd
commit 927e2b4769
2 changed files with 6 additions and 19 deletions

View File

@@ -236,18 +236,12 @@ for root, dirnames, filenames in os.walk(folder):
card.lines = line + '\n'
# Start parsing the rest of the data file
line = file.readline().strip()
while line != 'End':
for line in file.readlines():
line = line.strip()
# Skip empty lines
if line == '':
line = file.readline().strip()
continue
# We really shouldn't
if line == 'End':
break
if line.find(setStr) != -1:
info = line.replace('SetInfo:','')
parts = info.split('|')
@@ -257,8 +251,6 @@ for root, dirnames, filenames in os.walk(folder):
else:
card.lines += line +'\n'
line = file.readline().strip()
if not card.hasSet:
addSets(card)
card.hasSet = True
@@ -269,8 +261,6 @@ for root, dirnames, filenames in os.walk(folder):
for s in card.sets.values():
file.write('SetInfo:'+ s.set + '|' + s.rarity + '|' + s.image + '\n')
file.write('End')
err.write(card.name + '... Updated\n')
file.close()