configurationengine/source/cone/public/_etree_wrapper.py
changeset 9 63964d875993
parent 5 d2c80f5cab53
equal deleted inserted replaced
8:a2e65c705db8 9:63964d875993
   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)