clean-up: fix PEP8 E115 expected an indented block (comment)
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Sat, 19 Aug 2017 17:17:54 +0300
changeset 1779 6cf16e5bfbf9
parent 1778 1c6a704bd39c
child 1780 c52d1460cea8
clean-up: fix PEP8 E115 expected an indented block (comment)
PLCControler.py
ProjectController.py
editors/LDViewer.py
--- a/PLCControler.py	Sat Aug 19 17:12:12 2017 +0300
+++ b/PLCControler.py	Sat Aug 19 17:17:54 2017 +0300
@@ -3202,19 +3202,19 @@
                     new_task["Single"] = ""
                 interval = task.getinterval()
                 if interval is not None:
-#                    text = ""
-#                    if interval.hour != 0:
-#                        text += "%dh"%interval.hour
-#                    if interval.minute != 0:
-#                        text += "%dm"%interval.minute
-#                    if interval.second != 0:
-#                        text += "%ds"%interval.second
-#                    if interval.microsecond != 0:
-#                        if interval.microsecond % 1000 != 0:
-#                            text += "%.3fms"%(float(interval.microsecond) / 1000)
-#                        else:
-#                            text += "%dms"%(interval.microsecond / 1000)
-#                    new_task["Interval"] = text
+                    # text = ""
+                    # if interval.hour != 0:
+                    #     text += "%dh"%interval.hour
+                    # if interval.minute != 0:
+                    #     text += "%dm"%interval.minute
+                    # if interval.second != 0:
+                    #     text += "%ds"%interval.second
+                    # if interval.microsecond != 0:
+                    #     if interval.microsecond % 1000 != 0:
+                    #         text += "%.3fms"%(float(interval.microsecond) / 1000)
+                    #     else:
+                    #         text += "%dms"%(interval.microsecond / 1000)
+                    # new_task["Interval"] = text
                     new_task["Interval"] = interval
                 else:
                     new_task["Interval"] = ""
--- a/ProjectController.py	Sat Aug 19 17:12:12 2017 +0300
+++ b/ProjectController.py	Sat Aug 19 17:17:54 2017 +0300
@@ -1780,19 +1780,19 @@
         # Check remote target PLC correspondance to that md5
         if MD5 is not None:
             if not self._connector.MatchMD5(MD5):
-#                self.logger.write_warning(
-#                   _("Latest build does not match with target, please transfer.\n"))
+                # self.logger.write_warning(
+                #     _("Latest build does not match with target, please transfer.\n"))
                 self.EnableMethod("_Transfer", True)
             else:
-#                self.logger.write(
-#                   _("Latest build matches target, no transfer needed.\n"))
+                # self.logger.write(
+                #     _("Latest build matches target, no transfer needed.\n"))
                 self.EnableMethod("_Transfer", True)
                 # warns controller that program match
                 self.ProgramTransferred()
                 #self.EnableMethod("_Transfer", False)
         else:
-#            self.logger.write_warning(
-#                _("Cannot compare latest build to target. Please build.\n"))
+            # self.logger.write_warning(
+            #     _("Cannot compare latest build to target. Please build.\n"))
             self.EnableMethod("_Transfer", False)
 
     def _Disconnect(self):
--- a/editors/LDViewer.py	Sat Aug 19 17:12:12 2017 +0300
+++ b/editors/LDViewer.py	Sat Aug 19 17:17:54 2017 +0300
@@ -70,9 +70,9 @@
             removed = []
             for child in values["children"]:
                 if child != "stop":
-#                    if child in elements:
-#                        RemoveElement(child, element_tree)
-#                        removed.append(child)
+                    # if child in elements:
+                    #     RemoveElement(child, element_tree)
+                    #     removed.append(child)
                     if "start" in element_tree[child]["parents"]:
                         if element not in remove_stops["stop"]:
                             remove_stops["stop"].append(element)
@@ -118,12 +118,12 @@
             for wire, handle in connector.GetWires():
                 next = wire.EndConnected.GetParentBlock()
                 if isinstance(next, LD_PowerRail) and next.GetType() == LEFTRAIL or next in stop_list:
-#                    for remove in element_tree[element]["children"]:
-#                        RemoveElement(remove, element_tree)
-#                    element_tree[element]["children"] = ["stop"]
+                    # for remove in element_tree[element]["children"]:
+                    #     RemoveElement(remove, element_tree)
+                    # element_tree[element]["children"] = ["stop"]
                     element_tree[element]["children"].append("stop")
-#                elif element_tree[element]["children"] == ["stop"]:
-#                    element_tree[next] = None
+                # elif element_tree[element]["children"] == ["stop"]:
+                #     element_tree[next] = None
                 elif next not in element_tree or element_tree[next]:
                     element_tree[element]["children"].append(next)
                     if next in element_tree: