Remove .pyc and .pyo files when updating - #9961
Merged
Merged
Conversation
Perhaps only as long as add-ons weren't copied to that configuration folder via the GUI. Does the logon screen started instance of NVDA have write permission for this folder, as pyc and pyo files are created from the py files on NVDA startup? If this is the case, then the Installer should recommend to restart the PC after NVDA was successfully updated. |
Collaborator
Author
|
On the logon screen, we always start a fresh copy of NVDA. So if you
press ctrl+alt+delete for example, a new copy of NVDA starts and is
closed as soon as you leave the secure desktop. As the system config
copy can create pyc files, this is ok.
|
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.
Link to issue number:
Fixes #9960
Summary of the issue:
When updating NVDA, old *.pyc and *.pyo files can stay around. This could be problematic for Python 2 pyc files that Python 3 tries to open. Furthermore, it could cause issues such as reported in #9960, where the logHandler gets really mad if it tries to log a traceback for a file in library.zip which is also available in the installation directory.
Description of how this pull request fixes the issue:
When removing old program files, check for *.pyc and *.pyo files and get rid of them/
Testing performed:
Placed a handyTech.pyc file in
C:\Program Files (x86)\NVDA\brailleDisplayDrivers. Made sure it disappeared after installing the try build for this pr.Known issues with pull request:
Change log entry:
None needed