Skip to content

fix: replace 5 bare excepts with except Exception#61

Open
haosenwang1018 wants to merge 1 commit intoGVCLab:mainfrom
haosenwang1018:fix/bare-excepts
Open

fix: replace 5 bare excepts with except Exception#61
haosenwang1018 wants to merge 1 commit intoGVCLab:mainfrom
haosenwang1018:fix/bare-excepts

Conversation

@haosenwang1018
Copy link

Summary

Replace 5 bare except: clauses with except Exception: across 4 files.

Why

Bare except: catches KeyboardInterrupt and SystemExit, which can mask real errors and prevent clean process termination. except Exception: preserves error-suppression behavior while allowing system-level exceptions to propagate.

Changes

  • src/liveportrait/util.py (1 site)
  • src/modeling/engine_model.py (2 sites)
  • src/models/unet_2d_decoder.py (1 site)
  • src/utils/util.py (1 site)

Bare `except:` catches KeyboardInterrupt and SystemExit, which can mask
real errors. Replace with `except Exception:` for safer error handling.

Files changed:
- src/liveportrait/util.py (1)
- src/modeling/engine_model.py (2)
- src/models/unet_2d_decoder.py (1)
- src/utils/util.py (1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant