Changeset 316
- Timestamp:
- 05/31/08 00:07:03 (4 years ago)
- Files:
-
- 1 modified
-
hodgestar/PythonCode/DmTools/l5rchars.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hodgestar/PythonCode/DmTools/l5rchars.py
r312 r316 31 31 sSection = None 32 32 aSectionsLeft = ["name","clan","rank","rings","skills","adv and dis","kata"] 33 aOptionalSectionsLeft = ["notes","spells"] 33 34 self.parse_error = None # (line #, line) 34 35 … … 39 40 if oM: 40 41 sSection = oM.group("section").lower().strip() 41 assert sSection in aSectionsLeft 42 aSectionsLeft.remove(sSection) 42 if sSection in aSectionsLeft: 43 aSectionsLeft.remove(sSection) 44 elif sSection in aOptionalSectionsLeft: 45 aOptionalSectionsLeft.remove(sSection) 46 else: 47 raise RuntimeError("Unknown or duplicate section %s." % (sSection,)) 43 48 44 49 if sSection == "name": … … 101 106 self.kata[sKata] = iXp 102 107 108 elif sSection == "spells" and sLine.strip(): 109 pass 110 111 elif sSection == "notes" and sLine.strip(): 112 pass 113 103 114 else: 104 115 assert not sLine.strip()
