]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
scripts: apibuild: Improve error when API is missing from symbol file
authorPeter Krempa <pkrempa@redhat.com>
Mon, 13 Jun 2022 12:44:08 +0000 (14:44 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 7 Jul 2022 12:35:30 +0000 (14:35 +0200)
Improve:

 KeyError: 'virAdmConnectSetDaemonTimeout'

to

 Exception: Missing symbol file entry for 'virAdmConnectSetDaemonTimeout'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
scripts/apibuild.py

index 23a66734acdda28419a1bd11b8dbb0d6f6c5701a..c232b4e2c8c886a0be0ca65bfe9a50e3d28feb06 100755 (executable)
@@ -2405,6 +2405,8 @@ class docBuilder:
 
         # NB: this is consumed by a regex in 'getAPIFilenames' in hvsupport.pl
         if id.type == "function":
+            if name not in self.versions:
+                raise Exception("Missing symbol file entry for '%s'" % name)
             ver = self.versions[name]
             if ver is None:
                 raise Exception("Missing version for '%s'" % name)