equal
deleted
inserted
replaced
619 def PastePou(self, pou_type, pou_xml): |
619 def PastePou(self, pou_type, pou_xml): |
620 ''' |
620 ''' |
621 Adds the POU defined by 'pou_xml' to the current project with type 'pou_type' |
621 Adds the POU defined by 'pou_xml' to the current project with type 'pou_type' |
622 ''' |
622 ''' |
623 try: |
623 try: |
624 tree = minidom.parseString(pou_xml) |
624 tree = minidom.parseString(pou_xml.encode("utf-8")) |
625 root = tree.childNodes[0] |
625 root = tree.childNodes[0] |
626 except: |
626 except: |
627 return _("Couldn't paste non-POU object.") |
627 return _("Couldn't paste non-POU object.") |
628 |
628 |
629 if root.nodeName == "pou": |
629 if root.nodeName == "pou": |