editors/LDViewer.py
changeset 1765 ccf59c1f0b45
parent 1753 19f19c66b67e
child 1779 6cf16e5bfbf9
--- a/editors/LDViewer.py	Thu Aug 17 15:43:25 2017 +0300
+++ b/editors/LDViewer.py	Thu Aug 17 16:26:32 2017 +0300
@@ -215,7 +215,10 @@
                         if rung not in rungs:
                             rungs.append(rung)
                 if len(rungs) > 1:
-                    raise ValueError, _("Ladder element with id %d is on more than one rung.") % instance["id"]
+                    raise ValueError(
+                        _("Ladder element with id %d is on more than one rung.")
+                        % instance["id"])
+
                 element = self.FindElementById(instance["id"])
                 element_connectors = element.GetConnectors()
                 self.Rungs[rungs[0]].SelectElement(element)
@@ -231,7 +234,10 @@
                     if rung not in rungs:
                         rungs.append(rung)
                 if len(rungs) > 1:
-                    raise ValueError, _("Ladder element with id %d is on more than one rung.") % instance["id"]
+                    raise ValueError(
+                        _("Ladder element with id %d is on more than one rung.")
+                        % instance["id"])
+
                 element = self.FindElementById(instance["id"])
                 element_connectors = element.GetConnectors()
                 self.Rungs[rungs[0]].SelectElement(element)