Cleanup: use specific exception types where appropriate

This commit is contained in:
Campbell Barton
2024-10-08 09:41:53 +11:00
parent 1a1e75c253
commit 3525b83c6b
5 changed files with 5 additions and 9 deletions

View File

@@ -30,11 +30,7 @@ def main():
rna_api_new = []
for key, val_orig in mod_to_dict.items():
try:
val_new = mod_from_dict.pop(key)
except:
# print("not found", key)
val_new = val_orig
val_new = mod_from_dict.pop(key, val_orig)
# always take the class from the base
val = list(val_orig)

View File

@@ -119,7 +119,7 @@ for d in dir(bpy.types):
t = getattr(bpy.types, d)
try:
r = t.bl_rna
except:
except AttributeError:
r = None
if r:
seek(r, 'bpy.types.' + d + '.bl_rna', 0)