configurationengine/source/cone/public/_etree_wrapper.py
changeset 5 d2c80f5cab53
parent 3 e7e0ae78773e
equal deleted inserted replaced
4:0951727b8815 5:d2c80f5cab53
   236             # The default is the C version of ElementTree, but if that
   236             # The default is the C version of ElementTree, but if that
   237             # is not available, the pure Python version is used
   237             # is not available, the pure Python version is used
   238             for backend_id in self.DEFAULT_BACKEND_IMPORT_ORDER:
   238             for backend_id in self.DEFAULT_BACKEND_IMPORT_ORDER:
   239                 try:
   239                 try:
   240                     self.set_backend_id(backend_id)
   240                     self.set_backend_id(backend_id)
       
   241                     #break
   241                 except ImportError:
   242                 except ImportError:
   242                     pass
   243                     pass
   243             
   244             
   244             if self._backend_wrapper is None:
   245             if self._backend_wrapper is None:
   245                 raise RuntimeError("Failed to set any ElementTree backend! Tried these: %r" % self.DEFAULT_BACKEND_IMPORT_ORDER)
   246                 raise RuntimeError("Failed to set any ElementTree backend! Tried these: %r" % self.DEFAULT_BACKEND_IMPORT_ORDER)