Previously None was used as a return value to indicate that the user canceled but since None is also used to indicate the user made "no selection" these were not distinguishable any longer.
Before 9d02824d "q" was handled by calling sys.exit directly.
The commit ffbe09d reverts this and throws a custom exception if the user selects "quit". Is there any particular usage scenario where this is not acceptable?
I have tried to add more tests for the add-email subcomand but could not find such a use case.
Previously None was used as a return value to indicate that the user canceled but since None is also used to indicate the user made "no selection" these were not distinguishable any longer.
Before 9d02824d "q" was handled by calling sys.exit directly.
@jeffa5 the commit 9d02824d was from you. I know this is a very long time ago, but do you remember why you replaced
sys.exit
withreturn None
in theselect()
function? https://github.com/lucc/khard/commit/9d02824d418b10ae817350dca442d5bd294b4130#diff-a61de8c4a830ae55b3d7cf5f20bf54f44b71f5684bd73e42094a83246c9fc820L600-R609To me it looks like a "substitute all" mistake when replacing
sys.exit
in these places in the same commit: https://github.com/lucc/khard/commit/9d02824d418b10ae817350dca442d5bd294b4130#diff-a61de8c4a830ae55b3d7cf5f20bf54f44b71f5684bd73e42094a83246c9fc820L565-R574 https://github.com/lucc/khard/commit/9d02824d418b10ae817350dca442d5bd294b4130#diff-a61de8c4a830ae55b3d7cf5f20bf54f44b71f5684bd73e42094a83246c9fc820L594-R603 https://github.com/lucc/khard/commit/9d02824d418b10ae817350dca442d5bd294b4130#diff-a61de8c4a830ae55b3d7cf5f20bf54f44b71f5684bd73e42094a83246c9fc820L600-R609The commit ffbe09d reverts this and throws a custom exception if the user selects "quit". Is there any particular usage scenario where this is not acceptable? I have tried to add more tests for the
add-email
subcomand but could not find such a use case.