# HG changeset patch # User Edouard Tisserant # Date 1519133070 -3600 # Node ID b113d7de48991f0a71562f5a56057fe4303766be # Parent 5736d25bb393b19c850814c32405a91136592d19 Removed dead slow code diff -r 5736d25bb393 -r b113d7de4899 PLCControler.py --- a/PLCControler.py Tue Feb 20 14:16:51 2018 +0100 +++ b/PLCControler.py Tue Feb 20 14:24:30 2018 +0100 @@ -50,30 +50,6 @@ ScriptDirectory = paths.AbsDir(__file__) - -class LibraryResolver(etree.Resolver): - """Helper object for loading library in xslt stylesheets""" - - def __init__(self, controller, debug=False): - self.Controller = controller - self.Debug = debug - - def resolve(self, url, pubid, context): - # TODO stop deepcopy - lib_name = os.path.basename(url) - if lib_name in ["project", "stdlib", "extensions"]: - lib_el = etree.Element(lib_name) - if lib_name == "project": - lib_el.append(deepcopy(self.Controller.GetProject(self.Debug))) - elif lib_name == "stdlib": - for lib in StdBlckLibs.values(): - lib_el.append(deepcopy(lib)) - else: - for ctn in self.Controller.ConfNodeTypes: - lib_el.append(deepcopy(ctn["types"])) - return self.resolve_string(etree.tostring(lib_el), context) - - # ------------------------------------------------------------------------------- # Helpers object for generating pou block instances list # -------------------------------------------------------------------------------