]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/_ext: print out the module which fails the build 42669/head
authorKefu Chai <kchai@redhat.com>
Thu, 5 Aug 2021 08:20:53 +0000 (16:20 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 5 Aug 2021 09:50:12 +0000 (17:50 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
doc/_ext/ceph_confval.py

index 25a3f8bc7b23897ffdc8bb7491de05cd09bbd4ca..cde538b45c9a3687ab130a209d4210c4309da612 100644 (file)
@@ -355,7 +355,11 @@ class CephOption(ObjectDescription):
     def _render_option(self, name) -> str:
         cur_module = self._current_module()
         if cur_module:
-            opt = self._load_module(cur_module).get(name)
+            try:
+                opt = self._load_module(cur_module).get(name)
+            except Exception as e:
+                message = f'Unable to load module "{cur_module}": {e}'
+                raise self.error(message)
         else:
             opt = self._load_yaml().get(name)
         if opt is None: