The try: ... except: sys.exit(1) mapper results in b4 exiting without any error message for a very broad range of exceptions. This is in general less helpful than an exception backtrace.
This came up when trying to use b4 without user.name and user.email entries in the git config and using GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables instead, because LoreTrailer.__init__() accesses the config keys without checking for their existence or falling back to the envrionment variables.
While LoreTrailer.__init__() should likely be changed as well to print an error if name or email are unconfigured and should also likely use the environment variables, this tackles the low hanging fruit first and makes finding the issue easier by printing a backtrace in this case.
The
try: ... except: sys.exit(1)
mapper results in b4 exiting without any error message for a very broad range of exceptions. This is in general less helpful than an exception backtrace.This came up when trying to use b4 without
user.name
anduser.email
entries in the git config and usingGIT_AUTHOR_NAME
andGIT_AUTHOR_EMAIL
environment variables instead, becauseLoreTrailer.__init__()
accesses the config keys without checking for their existence or falling back to the envrionment variables.While
LoreTrailer.__init__()
should likely be changed as well to print an error if name or email are unconfigured and should also likely use the environment variables, this tackles the low hanging fruit first and makes finding the issue easier by printing a backtrace in this case.