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

[generate_asic_config_checksum.py] Convert to Python 3 #5783

Merged
merged 4 commits into from
Nov 4, 2020
Merged

[generate_asic_config_checksum.py] Convert to Python 3 #5783

merged 4 commits into from
Nov 4, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Nov 2, 2020

- How I did it

  • Convert script to Python 3
    • Need to open file in binary mode before hashing due to new string data type in Python 3 being unicode by default. This should probably have been done regardless.
  • Reorganize imports alphabetically
  • When running the script, don't explicitly call python. Instead let the program loader use the interpreter specified in the shebang (which is now python3).

- How to verify it

Ensure script continues to work as expected

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

@jleveque jleveque requested review from lguohan and daall November 2, 2020 21:04
@jleveque jleveque self-assigned this Nov 2, 2020
daall
daall previously approved these changes Nov 2, 2020
Copy link
Contributor

@daall daall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we switch to using the common Logger utility in this file as well?

@daall
Copy link
Contributor

daall commented Nov 2, 2020

Should we switch to using the common Logger utility in this file as well?

Oh wait this is a build script, so we can't use the sonic-py-common, right?

daall
daall previously approved these changes Nov 2, 2020
@jleveque
Copy link
Contributor Author

jleveque commented Nov 4, 2020

Retest vs please

@jleveque jleveque requested a review from daall November 4, 2020 22:43
@jleveque jleveque merged commit d3262d1 into sonic-net:master Nov 4, 2020
@jleveque jleveque deleted the gen_asic_chksum_py3 branch November 4, 2020 23:06
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
- Convert script to Python 3
    - Need to open file in binary mode before hashing due to new string data type in Python 3 being unicode by default. This should probably have been done regardless.
- Reorganize imports alphabetically
- When running the script, don't explicitly call `python`. Instead let the program loader use the interpreter specified in the shebang (which is now `python3`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants