-
Notifications
You must be signed in to change notification settings - Fork 8
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
FIX: Don't always remove AEDT project files #413
Conversation
Remove AEDT project-related files on EDB open (e.g. file.aedt and/or file.aedt.lock for file.aedb) only if Edb constructor is run with isreadonly False and remove_existing_aedt True.
@svandenb-dev BTW it looks like PyAEDT already has some logic to handle an existing .aedt file and open it if you try to open an edb.def or .aedb folder: https://github.com/ansys/pyaedt/blob/87739a9ea3223ee8e57d3d7c6ca7569a4f18eefe/pyaedt/application/Design.py#L1122 I guess we should leave it to users to understand when they have to remove the AEDT file before opening a modified EDB (with the warning I'm introducing here), what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great update. Please, could you perform the minor changes suggested to make the code compliant with the changes you performed (shutil.rmtree to os.unlink).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Rename mocks to match mocked function names. Co-authored-by: Sébastien Morais <[email protected]>
Missed renaming one use of a mock in the previous commit, causing a test to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for doing the requested changes !
Remove AEDT project-related files on EDB open (e.g. file.aedt and/or file.aedt.lock for file.aedb) only if Edb constructor is run with isreadonly False and remove_existing_aedt True.
Fixes #412