--- a/PLCControler.py Tue Feb 20 11:24:40 2018 +0100
+++ b/PLCControler.py Tue Feb 20 14:16:51 2018 +0100
@@ -36,10 +36,9 @@
from lxml import etree
import util.paths as paths
-from util.TranslationCatalogs import NoTranslate
from plcopen import *
from plcopen.types_enums import *
-from plcopen.XSLTModelQuery import _StringValue, _BoolValue, _translate_args
+from plcopen.XSLTModelQuery import _StringValue, _BoolValue, _translate_args
from plcopen.InstancesPathCollector import InstancesPathCollector
from plcopen.POUVariablesCollector import POUVariablesCollector
from plcopen.InstanceTagnameCollector import InstanceTagnameCollector
@@ -51,6 +50,7 @@
ScriptDirectory = paths.AbsDir(__file__)
+
class LibraryResolver(etree.Resolver):
"""Helper object for loading library in xslt stylesheets"""
@@ -587,7 +587,7 @@
def GetPouInstanceTagName(self, instance_path, debug=False):
project = self.GetProject(debug)
- if project is not None :
+ if project is not None:
return self.InstanceTagnameCollector.Collect(project,
debug,
instance_path)
@@ -1110,8 +1110,8 @@
def GetVariableDictionary(self, object_with_vars, tree=False, debug=False):
variables = []
- factory = self.VariableInfoCollector.Collect(object_with_vars,
- debug, variables, tree)
+ self.VariableInfoCollector.Collect(object_with_vars,
+ debug, variables, tree)
return variables
# Add a global var to configuration to configuration
@@ -1264,7 +1264,7 @@
# Return the return type if there is one
return_type = pou.interface.getreturnType()
if return_type is not None:
- factory = self.VariableInfoCollector.Collect(return_type,
+ factory = self.VariableInfoCollector.Collect(return_type,
debug, [], tree)
if tree:
return [factory.GetType(), factory.GetTree()]