diff -r c1e5b9f19483 -r c74815729afd canfestival/canfestival.py --- a/canfestival/canfestival.py Thu Aug 17 17:25:17 2017 +0300 +++ b/canfestival/canfestival.py Fri Aug 18 12:36:31 2017 +0300 @@ -74,7 +74,7 @@ "IEC_type": IECTypeConversion.get(typeinfos["name"]), "var_name": "%s_%4.4x_%2.2x" % ("_".join(name.split()), index, subindex), "location": "%s%s" % (SizeConversion[size], ".".join(map(str, current_location + - (index, subindex)))), + (index, subindex)))), "description": "", "children": []}) return {"name": name, @@ -352,16 +352,19 @@ current_location = self.GetCurrentLocation() nodeindexes = self.SlaveNodes.keys() nodeindexes.sort() - return {"name": self.BaseParams.getName(), - "type": LOCATION_CONFNODE, - "location": self.GetFullIEC_Channel(), - "children": [GetSlaveLocationTree(self.Manager.GetCurrentNodeCopy(), - current_location, - _("Local entries"))] + - [GetSlaveLocationTree(self.SlaveNodes[nodeid]["Node"], - current_location + (nodeid,), - self.SlaveNodes[nodeid]["Name"]) - for nodeid in nodeindexes] + children = [] + children += [GetSlaveLocationTree(self.Manager.GetCurrentNodeCopy(), + current_location, + _("Local entries"))] + children += [GetSlaveLocationTree(self.SlaveNodes[nodeid]["Node"], + current_location + (nodeid,), + self.SlaveNodes[nodeid]["Name"]) for nodeid in nodeindexes] + + return { + "name": self.BaseParams.getName(), + "type": LOCATION_CONFNODE, + "location": self.GetFullIEC_Channel(), + "children": children } _GeneratedMasterView = None