I assume this is required to suppress ugly tracebacks when the module is run via a stub generated from distutils-entry-point.