Browse Source

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
Mitchell Stokes 5 years ago
parent
commit
2cb3779204
1 changed files with 2 additions and 0 deletions
  1. 2 0
      direct/src/dist/FreezeTool.py

+ 2 - 0
direct/src/dist/FreezeTool.py

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