Skip to content

Commit

Permalink
Minor Bug Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 31, 2017
1 parent a95b8ea commit af38b8c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/lib/PIA/Rockwell/XML/Templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def checkIfChild(self, nodeTag):
return True

def addController(self, Controller):
assert etree.iselement(Controller.getLocalRoot()) and Controller.getLocalRoot().tag = "Controller"
assert etree.iselement(Controller.getLocalRoot()) and Controller.getLocalRoot().tag == "Controller"
if not self.checkIfChild("Controller"):
self.Controller = etree.SubElement(self.root, "Controller")
self.Controller.append(Datatype)
Expand Down Expand Up @@ -67,31 +67,31 @@ def checkIfChild(self, nodeTag):
return True

def addDatatype(self, Datatype):
assert etree.iselement(Datatype.getLocalRoot()) and Datatype.getLocalRoot().tag = "Datatype"
assert etree.iselement(Datatype.getLocalRoot()) and Datatype.getLocalRoot().tag == "Datatype"
if not self.checkIfChild("Datatypes"):
self.Datatypes = etree.SubElement(self.root, "Datatypes")
self.Datatypes.append(Datatype)

def addModule(self, Module):
assert etree.iselement(Module.getLocalRoot()) and Module.getLocalRoot().tag = "Module"
assert etree.iselement(Module.getLocalRoot()) and Module.getLocalRoot().tag == "Module"
if not self.checkIfChild("Modules"):
self.Modules = etree.SubElement(self.root, "Modules")
self.Modules.append(Datatype)

def addAddOnInstructionDefinition(self, AddOnInstructionDefinition):
assert etree.iselement(AddOnInstructionDefinition.getLocalRoot()) and AddOnInstructionDefinition.getLocalRoot().tag = "AddOnInstructionDefinition"
assert etree.iselement(AddOnInstructionDefinition.getLocalRoot()) and AddOnInstructionDefinition.getLocalRoot().tag == "AddOnInstructionDefinition"
if not self.checkIfChild("AddOnInstructionDefinitions"):
self.AddOnInstructionDefinitions = etree.SubElement(self.root, "AddOnInstructionDefinitions")
self.AddOnInstructionDefinitions.append(Datatype)

def addProgram(self, Program):
assert etree.iselement(Program.getLocalRoot()) and Program.getLocalRoot().tag = "Program"
assert etree.iselement(Program.getLocalRoot()) and Program.getLocalRoot().tag == "Program"
if not self.checkIfChild("Programs"):
self.Programs = etree.SubElement(self.root, "Programs")
self.Programs.append(Datatype)

def addTask(self, Task):
assert etree.iselement(Task.getLocalRoot()) and Task.getLocalRoot().tag = "Task"
assert etree.iselement(Task.getLocalRoot()) and Task.getLocalRoot().tag == "Task"
if not self.checkIfChild("Tasks"):
self.Tasks = etree.SubElement(self.root, "Tasks")
self.Tasks.append(Datatype)
Expand Down Expand Up @@ -317,13 +317,13 @@ def checkIfChild(self, nodeTag):
return True

def addRoutine(self, Routine):
assert etree.iselement(Routine.getLocalRoot()) and Routine.getLocalRoot().tag = "Routine"
assert etree.iselement(Routine.getLocalRoot()) and Routine.getLocalRoot().tag == "Routine"
if not self.checkIfChild("Routines"):
self.Routines = etree.SubElement(self.root, "Routines")
self.Routines.append(Routine)

def addTag(self, Tag):
assert etree.iselement(Tag.getLocalRoot()) and Tag.getLocalRoot().tag = "Tag"
assert etree.iselement(Tag.getLocalRoot()) and Tag.getLocalRoot().tag == "Tag"
if not self.checkIfChild("Tags"):
self.Tags = etree.SubElement(self.root, "Tags")
self.Tags.append(Tag)
Expand Down Expand Up @@ -379,7 +379,7 @@ def checkIfChild(self, nodeTag):
return True

def addRung(self, Rung):
assert etree.iselement(Rung.getLocalRoot()) and Rung.getLocalRoot().tag = "Rung"
assert etree.iselement(Rung.getLocalRoot()) and Rung.getLocalRoot().tag == "Rung"
if not self.checkIfChild("RLLContent"):
self.RLLContent = etree.SubElement(self.root, "RLLContent")
self.RLLContent.append(Rung)
Expand Down

0 comments on commit af38b8c

Please sign in to comment.