Projet

Général

Profil

0001-fix-deprecation-warning-in-ElementTree.patch

Benjamin Dauvergne, 04 octobre 2018 23:42

Télécharger (1,09 ko)

Voir les différences:

Subject: [PATCH 1/4] fix deprecation warning in ElementTree

 wcs/fields.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
wcs/fields.py
257 257
                continue
258 258
            if el is None:
259 259
                continue
260
            if el.getchildren():
260
            if list(el):
261 261
                if type(getattr(self, attribute)) is list:
262
                    v = [x.text.encode(charset) for x in el.getchildren()]
262
                    v = [x.text.encode(charset) for x in el]
263 263
                elif type(getattr(self, attribute)) is dict:
264 264
                    v = {}
265
                    for e in el.getchildren():
265
                    for e in el:
266 266
                        v[e.tag] = e.text.encode(charset)
267 267
                else:
268 268
                    print 'currently:', self.__dict__
269
-