diff --git a/Common/Servers/PyCalmux/src/Calmux/PyCalmuxImpl.py b/Common/Servers/PyCalmux/src/Calmux/PyCalmuxImpl.py index 099156d308a930edcd3e1683841c90fcba2a2449..389f52ab9395154be85281f1fc0add094debe611 100644 --- a/Common/Servers/PyCalmux/src/Calmux/PyCalmuxImpl.py +++ b/Common/Servers/PyCalmux/src/Calmux/PyCalmuxImpl.py @@ -197,8 +197,7 @@ class PyCalmuxImpl(CalMux, cc, services, lcycle): raise exc try: - children = ElementTree.fromstring(dao).getchildren() - for child in children: + for child in list(ElementTree.fromstring(dao)): backend, channel, polarity = [c.text.strip() for c in child] backend = backend.lower() value = (int(channel), int(polarity)) diff --git a/Common/Servers/PyDewarPositioner/src/DewarPositioner/cdbconf.py b/Common/Servers/PyDewarPositioner/src/DewarPositioner/cdbconf.py index e0c3ec63b983c63923eca0f02dcbcb987b1db442..e31369e9e86584e7d20a6b071cfb23a9306d7c7d 100644 --- a/Common/Servers/PyDewarPositioner/src/DewarPositioner/cdbconf.py +++ b/Common/Servers/PyDewarPositioner/src/DewarPositioner/cdbconf.py @@ -210,7 +210,7 @@ class CDBConf(object): try: dal = ACSCorba.cdb() dao = dal.get_DAO(path) - children = ElementTree.fromstring(dao).getchildren() + children = list(ElementTree.fromstring(dao)) except cdbErrType.CDBRecordDoesNotExistEx: raeson = "CDB record %s does not exists" %path logger.logError(raeson) @@ -218,7 +218,7 @@ class CDBConf(object): exc.setReason(raeson) raise exc except Exception as ex: - children = () + children = [] setattr(self, dictName, {}) d = getattr(self, dictName) diff --git a/Common/Tests/test/cdb/test_procedures.py b/Common/Tests/test/cdb/test_procedures.py index fa6c6b3fdc8391d56f396afce310150e337cb94e..6906675523fd916673ec41c680382d2b90d491ec 100644 --- a/Common/Tests/test/cdb/test_procedures.py +++ b/Common/Tests/test/cdb/test_procedures.py @@ -7,7 +7,7 @@ class TestProcedures(unittest.TestCase): def setUp(self): dal = ACSCorba.cdb() dao = dal.get_DAO('alma/Procedures/StationProcedures') - self.procedures = ElementTree.fromstring(dao).getchildren() + self.procedures = list(ElementTree.fromstring(dao)) def test_reset_not_allowed_in_setup(self): """Vefify the setup does not execute the antennaReset command""" diff --git a/SRT/Servers/SRTPyIFDistributor14/src/IFDistributor14/SRTIFDistributor14Impl.py b/SRT/Servers/SRTPyIFDistributor14/src/IFDistributor14/SRTIFDistributor14Impl.py index c292225d7072bd9f26e3ca8498231a108e397bce..f5ffae43697a082490663dc483e73d820a1f5a7d 100644 --- a/SRT/Servers/SRTPyIFDistributor14/src/IFDistributor14/SRTIFDistributor14Impl.py +++ b/SRT/Servers/SRTPyIFDistributor14/src/IFDistributor14/SRTIFDistributor14Impl.py @@ -210,8 +210,7 @@ class SRTIFDistributor14Impl(SRTIFDistributor14, cc, services, lcycle): raise exc try: - children = ElementTree.fromstring(dao).getchildren() - for child in children: + for child in list(ElementTree.fromstring(dao)) backend, channel, address = [c.text.strip() for c in child] value = {int(channel): int(address)} if backend in self.mapping: