Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the build and execution robustness of the switch configuration generator tool, with a focus on better packaging of the BMC converter module, enhanced path resolution for templates, and improved Unicode handling for Windows consoles. It also adds stricter error reporting and safer printing throughout the main execution flow.
Packaging and module inclusion improvements:
6.11.*and added explicit inclusion of theconvertors.convertors_bmc_switch_jsonmodule in the build steps for both Windows and Linux, ensuring the BMC converter is always packaged. Also excluded unnecessary modules (tkinter,matplotlib,PIL) to reduce executable size. [1] [2] [3]convertors_lab_switch_json.pyto help PyInstaller detect and bundle it.Path resolution and error handling:
convertors_bmc_switch_json.pyto handle both script and bundled (PyInstaller) execution, with clearer error messages if templates are missing.Unicode and console output robustness:
safe_printfunction to handle Unicode output gracefully, preventing crashes or garbled text in the console. All user-facing output inmain.pynow usessafe_print. [1] [2] [3] [4] [5] [6] [7] [8]These changes collectively improve the reliability of both the build process and runtime experience for users, especially on Windows and in packaged environments.