build_apps: Use FreezeTool.__replacePaths() to cleanup tracebacks

This alters paths in tracebacks to contain just module names instead of
full, absolute paths. This makes tracebacks easier to read and leaks
less information about the build machine.

Closes #991
This commit is contained in:
Mitchell Stokes 2020-08-16 14:43:43 -07:00 committed by rdb
parent dfa1eb78cd
commit 2cb3779204

View File

@ -1695,6 +1695,8 @@ class Freezer:
def generateRuntimeFromStub(self, target, stub_file, use_console, fields={},
log_append=False):
self.__replacePaths()
# We must have a __main__ module to make an exe file.
if not self.__writingModule('__main__'):
message = "Can't generate an executable without a __main__ module."