Warning on modulo by zero fixed
authorlbessard
Fri, 09 Jan 2009 17:07:56 +0100
changeset 288 7ee96191c476
parent 287 5b3083695c8c
child 289 d17bd2f00a87
Warning on modulo by zero fixed
plugger.py
--- a/plugger.py	Sun Jan 04 17:30:34 2009 +0100
+++ b/plugger.py	Fri Jan 09 17:07:56 2009 +0100
@@ -1105,7 +1105,7 @@
         for v in self._VariablesList :
             if v["vartype"] == "FB" and v["type"] == "PYTHON_EVAL":
                 python_eval_fb_list.append(v)
-        python_eval_fb_count = len(python_eval_fb_list)
+        python_eval_fb_count = max(1, len(python_eval_fb_list))
         
         # prepare debug code
         python_code = targets.code("plc_python") % {