--- a/py_ext/PythonFileCTNMixin.py Wed May 15 22:37:07 2013 +0200
+++ b/py_ext/PythonFileCTNMixin.py Wed May 15 23:11:49 2013 +0200
@@ -157,7 +157,7 @@
}
"""
- vardec, varret, varpub = map("\n".join, zip(*[
+ var_str = map("\n".join, zip(*[
map(lambda f : f % varinfo,
(vardecfmt, varretfmt, varpubfmt))
for varinfo in map(lambda variable : {
@@ -167,6 +167,10 @@
"IECtype": "IEC_%s"%variable.gettype(),
"initial" : str(variable.getinitial())},
self.CodeFile.variables.variable)]))
+ if len(var_str) > 0:
+ vardec, varret, varpub = var_str
+ else:
+ vardec = varret = varpub = ""
PyCFileContent = """\
/*