Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flash.py #148

Closed
wants to merge 1 commit into from
Closed

Update flash.py #148

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 21, 2024

What's new

  • Key Improvements:

  • Modularization: Commands are now set up in separate methods, enhancing readability and maintainability.

  • Logging: Utilizes logging module consistently for clear status updates and error messages.

  • Code Reuse: Consolidates repetitive operations (_set_rdp, _flash) into helper methods, reducing redundancy.

  • Error Handling: Basic error handling is in place, ensuring errors are logged and appropriate exit codes are returned.

  • Adjust the logging level (logging.INFO, logging.DEBUG, etc.).

For the reviewer

  • I've uploaded the firmware with this patch to a device and verified its functionality
  • I've confirmed the bug to be fixed / feature to be stable

Key Improvements:

Modularization: Commands are now set up in separate methods, enhancing readability and maintainability.

Logging: Utilizes logging module consistently for clear status updates and error messages.

Code Reuse: Consolidates repetitive operations (_set_rdp, _flash) into helper methods, reducing redundancy.

Error Handling: Basic error handling is in place, ensuring errors are logged and appropriate exit codes are returned.

Adjust the logging level (logging.INFO, logging.DEBUG, etc.).
@Willy-JL
Copy link
Member

this script is not actively used anywhere really (atleast not by us), and is not that complicated anyway, this PR doesn;t really bring any concrete improvement. if you really want to get AI to reorganize code, submit this to official firmware repository as they use this script, we dont.

thanks anyway for the effort!

@Willy-JL Willy-JL closed this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant