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

Add exception handling to os.remove in the remove-asset-by_pathfang method of the avocado/utilities/asset.py file #5979

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

faker-king
Copy link

Using pathlib can make file path operations more object-oriented and easy to understand, and have better compatibility across different operating systems.

@mr-avocado
Copy link

mr-avocado bot commented Jun 27, 2024

Dear contributor,
Avocado is currently at the end of sprint #106, therefore we are in feature freeze state.
Please avoid merging changes that do not fall into these categories:

  • Bug fixes
  • Documentation updates

The feature freeze will be active until the release planned on 28 June 2024.

@faker-king
Copy link
Author

hi @richtja, Can you help me see if I can merge the code

@clebergnu clebergnu self-requested a review July 2, 2024 15:28
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @faker-king please remove 9806712 and 1051bc0. IMO, they are not related to this PR. To be honest, I am not sure about usage of pathlib in one specific method of asset utility. Correct me if I am wrong, but I don't see any additional benefit in this change.

But you catch that we don't have exception handling for this file manipulation, and that would be a great update. Therefore, please add only the exception handling. Thanks

avocado/utils/asset.py Show resolved Hide resolved
avocado/utils/asset.py Show resolved Hide resolved
@faker-king
Copy link
Author

Hi @richtja, I am very sorry for the delay in modifying this PR. I have already made the necessary changes as per your request. Could you please double check.

Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @faker-king, thank you for your updates. The overall changes LGTM, but you still have 9806712 and 1051bc0 commit which are not related to this PR, please drop those.

Also, can you please update the title of ee32a50, from your description you are updating the exception handling to all os.remove calls, but this commit is only about avocado/utils/asset.py. Please be more specific. Thank you.

@faker-king faker-king changed the title Using the pathlib module to handle file paths enhances the readability and maintainability of the code Add exception handling to os.remove Jul 26, 2024
@faker-king faker-king closed this Jul 26, 2024
@faker-king faker-king reopened this Aug 28, 2024
@faker-king
Copy link
Author

@richtja Due to some permission issues with my account, it was verified and I have made the necessary modifications as per your suggestion to see if it can be merged

@richtja
Copy link
Contributor

richtja commented Aug 28, 2024

Hi @faker-king, thank you for your updates. I'm still missing the commit title update, your changes don't add exception handling to os.remove in the whole avocado project, it is located only to avocado/utils/asset.py. Can you please update the title to be more specific? Thank you.

@faker-king faker-king changed the title Add exception handling to os.remove Add exception handling to os.remove in the remove-asset-by_pathfang method of the avocado/utilities/asset.py file Aug 29, 2024
@faker-king
Copy link
Author

@richtja Modified

@richtja
Copy link
Contributor

richtja commented Aug 29, 2024

@richtja Modified

Hi @faker-king, sorry but maybe I haven't expressed myself clearly, I was talking about commit headline. It is needed for easier search thought changes in commit history in the future. Can you please update the commit headline as well, thanks.

…ethod of the avocado/utilities/asset.py file

Signed-off-by: mataotao <[email protected]>
@faker-king
Copy link
Author

@richtja Haha, it's okay, I didn't understand either, it has been modified.

Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @faker-king, it LGTM now. Thanks for your changes.

@richtja richtja merged commit f1ed1f8 into avocado-framework:master Sep 2, 2024
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 107
Development

Successfully merging this pull request may close these issues.

3 participants