mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cleanup: use specific exception types where appropriate
This commit is contained in:
parent
1a1e75c253
commit
3525b83c6b
5 changed files with 5 additions and 9 deletions
|
|
@ -152,7 +152,7 @@ def edge_face_count_dict(mesh):
|
|||
key = edges[loops[i].edge_index].key
|
||||
try:
|
||||
face_edge_count[key] += 1
|
||||
except:
|
||||
except KeyError:
|
||||
face_edge_count[key] = 1
|
||||
|
||||
return face_edge_count
|
||||
|
|
|
|||
|
|
@ -645,7 +645,7 @@ def BuildRNAInfo():
|
|||
def base_id(rna_struct):
|
||||
try:
|
||||
return rna_struct.base.identifier
|
||||
except:
|
||||
except AttributeError:
|
||||
return "" # invalid id
|
||||
|
||||
# structs = [(base_id(rna_struct), rna_struct.identifier, rna_struct) for rna_struct in bpy.doc.structs.values()]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue