.hgignore
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 10 Aug 2018 17:45:33 +0300
changeset 2278 a3ac46366b86
parent 2165 02a2b5dee5e3
child 2352 fec90dc70e16
permissions -rw-r--r--
Dirty fix for error '_object_has_no_attribute_'getSlave' in EtherCAT extension

traceback:
File "/home/developer/WorkData/PLC/beremiz/beremiz/IDEFrame.py", line 1433, in OnPouSelectedChanged
window.RefreshView()
File "/home/developer/WorkData/PLC/beremiz/beremiz/etherlab/ConfigEditor.py", line 837, in RefreshView
self.RefreshProcessVariables()
File "/home/developer/WorkData/PLC/beremiz/beremiz/etherlab/ConfigEditor.py", line 886, in RefreshProcessVariables
slaves = self.Controler.GetSlaves(**self.CurrentNodesFilter)
File "/home/developer/WorkData/PLC/beremiz/beremiz/etherlab/EthercatMaster.py", line 341, in GetSlaves
for slave in self.Config.getConfig().getSlave():
<type 'exceptions.AttributeError'>:_'lxml.etree._Element'_object_has_no_attribute_'getSlave'

Steps to reproduce problem:

- Add new EtherCAT master
- Add new EthercatNode to the master
- double click on


this is looks like dirty hack to fix strange problem with initial[0]
changing its type after returning from _init_ method to lxml.etree._Element
As a result all methods generated by class factory are lost.

For example, in function initMethod initial[0].__class__ points to
xmlclass.xmlclass.Config. After map(self.append, initial)
self.Config.__class__ is 'xmlclass.xmlclass.Config' as well.
But after returning from initMethod (_init) in CreateElement
self.Config.__class__ has changed to lxml.etree._Element.


I've noticed similar behavior if copy/deepcopy is used for any child
of etree.ElementBase. See simple example below.
[-------------------------------------------------------------]
#!/usr/bin/python

from __future__ import print_function
from lxml import etree
import copy

class DefaultElementClass(etree.ElementBase):
def getLocalTag(self):
return etree.QName(self.tag).localname


def printInformation(x):
print(x, x.__class__, "getLocalTag" in dir(x))


a = DefaultElementClass()
printInformation(a)

#
printInformation(copy.copy(a))
printInformation(copy.deepcopy(a))
[-------------------------------------------------------------]
359
8049afde06ab prevent eclipse to push .project with .hgignore
'Gr?gory Tr?lat <gregory.trelat@lolitech.fr>'
parents:
diff changeset
     1
.project
441
379c66468cf6 added files to ignore in hgignore
Edouard TISSERANT <edouard.tisserant@gmail.com>
parents: 359
diff changeset
     2
1651
f077f8fb9ba7 1. Deleted .directory file, and added it to .hgignore.
PaulBeltyukov
parents: 1560
diff changeset
     3
.directory
2022
c2295d311402 First working implementation of Beremiz plugin for etherlab
laurent
parents:
diff changeset
     4
c2295d311402 First working implementation of Beremiz plugin for etherlab
laurent
parents:
diff changeset
     5
syntax: regexp
944
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents: 734
diff changeset
     6
^tests/.*/build$
1526
0fa5de94c131 Added .idea dir to ignore.
alexander.shaykhrazeev@gmail.com <alexander.shaykhrazeev@gmail.com>
parents: 955
diff changeset
     7
^.idea/.*
2022
c2295d311402 First working implementation of Beremiz plugin for etherlab
laurent
parents:
diff changeset
     8
syntax: regexp
441
379c66468cf6 added files to ignore in hgignore
Edouard TISSERANT <edouard.tisserant@gmail.com>
parents: 359
diff changeset
     9
^.*\.pyc$
2022
c2295d311402 First working implementation of Beremiz plugin for etherlab
laurent
parents:
diff changeset
    10
syntax: regexp
955
7ef2f485c28f More ignored files in .hgignore
Edouard Tisserant
parents: 944
diff changeset
    11
^.*~$
7ef2f485c28f More ignored files in .hgignore
Edouard Tisserant
parents: 944
diff changeset
    12
syntax: regexp
7ef2f485c28f More ignored files in .hgignore
Edouard Tisserant
parents: 944
diff changeset
    13
^.*\.swp$
2082
caae3ad2d03b Adding support for selecting a PDO in a list of mutually exclusive configured PDOs in Ethercat Network Configurator
Laurent Bessard
parents: 2022
diff changeset
    14
1559
91129212e9a6 ignore generated bugreports and output of i18n script
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1526
diff changeset
    15
bug_report.*\.txt
1560
4ce8492159ab add version with commit hash to 'About' dialogs for Beremiz IDE and PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1559
diff changeset
    16
i18n/.*.new$
4ce8492159ab add version with commit hash to 'About' dialogs for Beremiz IDE and PLCOpenEditor
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1559
diff changeset
    17
revision
1725
f8e4650619f7 ignore built documentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1651
diff changeset
    18
f8e4650619f7 ignore built documentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1651
diff changeset
    19
doc/_build
f8e4650619f7 ignore built documentation
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1651
diff changeset
    20
doc/locale