allow empty interpretation in csv
This commit is contained in:
parent
69bbac7efa
commit
d14ca1181a
2 changed files with 5 additions and 1 deletions
|
@ -18,6 +18,7 @@ class System:
|
|||
substitutions: list[tuple[str, str]],
|
||||
interpretations: list[tuple[str, str]],
|
||||
):
|
||||
# Space trimming for class members
|
||||
self.name = name.strip()
|
||||
"""System name"""
|
||||
|
||||
|
@ -74,6 +75,9 @@ class System:
|
|||
for member, interpretation in self.interpretations:
|
||||
inter_element = XMLSubElement(interpretations, "interpretation")
|
||||
inter_element.set("member", member)
|
||||
# If the interpretation is "do nothing", then do nothing
|
||||
if len(interpretation) == 0:
|
||||
interpretation = "TURN 0"
|
||||
inter_element.text = interpretation
|
||||
|
||||
return system
|
||||
|
|
|
@ -22,4 +22,4 @@ peano,FAPM,PFA,F,AMFMFAPFPFAPFPFAPFPFAMFMFAMFMFAMFMFAPFPFA,P,M,LINE 10,LINE 10,T
|
|||
pyramid,FPM,FPPFPPFPPPFMMFMMF,FFPPFPPFPPFFF,P,M,LINE 10,TURN 60,TURN -60
|
||||
levey,FPM,FPPFPPFPPF,MFPPFM,P,M,LINE 10,TURN 45,TURN -45
|
||||
carpet,FAPM,F,FPFMFMFMAPFPFPFMF,AAA,P,M,LINE 10,MOVE 10,TURN 90,TURN -90
|
||||
square,FXPM,FPXFPFPXF,F,XFMFPFMXFPFPXFMFPFMX,P,M,LINE 10,TURN 0,TURN 90,TURN -90
|
||||
square,FXPM,FPXFPFPXF,F,XFMFPFMXFPFPXFMFPFMX,P,M,LINE 10,,TURN 90,TURN -90
|
||||
|
|
|
Reference in a new issue