liberapay / git-lfs-fetch.py

Lightweight Git Large File Storage fetcher written in python
31 stars 13 forks source link

raise exception instead of sys.exit #11

Open bertsky opened 1 year ago

bertsky commented 1 year ago

Printing and forced system exit makes it difficult to wrap this as a library, and even on the interactive interpreter it is quite a surprise to find yourself kicked out: https://github.com/liberapay/git-lfs-fetch.py/blob/23026ff916065ee113cdc898e2670f6d9587a1a5/git_lfs/__init__.py#L159-L162

So IMO this should simply be an assertion or exception.

Changaco commented 1 year ago

I encourage you to make a pull request to fix this issue.