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

extend chipsec_main search to both py and pyc #1289

Merged
merged 2 commits into from
Jan 28, 2022

Conversation

tallu
Copy link
Contributor

@tallu tallu commented Oct 23, 2021

No description provided.

@BrentHoltsclaw
Copy link
Member

Can the logic be modified to explicitly match only py and pyc files.

@tallu
Copy link
Contributor Author

tallu commented Oct 26, 2021 via email

@tallu
Copy link
Contributor Author

tallu commented Oct 27, 2021 via email

@npmitche
Copy link
Member

Our normal execution of chipsec does not produce .pyo files, so I don't think it's necessary to include them.

search for py and pyc modules explicitly instead of searching for py*
@npmitche
Copy link
Member

@tallu if you want to open a new PR around this that fixes the issue mentioned in #1357, please do!

@tallu
Copy link
Contributor Author

tallu commented Jan 29, 2022 via email

@npmitche
Copy link
Member

npmitche commented Feb 1, 2022

Hi @tallu, simply running chipsec_main.py twice, the first time builds the extra .pyc files, then on the subsequent runs it sees them and errors out.
pycprlog.txt

@tallu
Copy link
Contributor Author

tallu commented Feb 5, 2022 via email

@npmitche
Copy link
Member

npmitche commented Mar 4, 2022

Hi @tallu
Sorry for the lack of response. What is your use case for wanting to include .pyc files? Are you moving .pyc files that were cached on a different system without moving the source (.py)? I'm not sure if that's a viable way to run python code.

If you simply want python to use the cached bytecodes (.pyc) instead of using the source (.py), this is done automatically when .pyc files are present and this patch is not needed.

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

4 participants