Skip to content

Commit 30d5b11

Browse files
remove bare excepts
1 parent 6db7941 commit 30d5b11

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

operators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def compress_textures(obj, ratio, export_path=None, save_compressed=True):
597597
if temp_file and os.path.exists(temp_file.name):
598598
try:
599599
os.unlink(temp_file.name)
600-
except:
600+
except OSError:
601601
pass
602602

603603
# Copy other relevant properties
@@ -1361,7 +1361,7 @@ def export_object(obj, file_path, scene_props):
13611361
tex_path = os.path.join(export_dir, tex_filename)
13621362
try:
13631363
total_texture_size += os.path.getsize(tex_path)
1364-
except:
1364+
except OSError:
13651365
pass
13661366

13671367
if total_texture_size > 0:
@@ -1385,7 +1385,7 @@ def export_object(obj, file_path, scene_props):
13851385
for tex_file in texture_files:
13861386
try:
13871387
total_texture_size += os.path.getsize(tex_file)
1388-
except:
1388+
except OSError:
13891389
pass
13901390

13911391
texture_size_mb = total_texture_size / (1024 * 1024)
@@ -1581,7 +1581,7 @@ def execute(self, context):
15811581
try:
15821582
if lod_level == 0:
15831583
# LOD0: Create base copy with modifiers applied
1584-
logger.info(f"Creating base LOD0...")
1584+
logger.info("Creating base LOD0...")
15851585
lod_obj = create_export_copy(
15861586
original_obj,
15871587
context

0 commit comments

Comments
 (0)