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

obj: staging: remove redundant exists() call #6217

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Jun 23, 2021

The first step in removing redundant exists() calls, since our filesystems now can just raise an appropriate FileNotFoundError instead.

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

@efiop efiop requested a review from a team as a code owner June 23, 2021 18:30
@efiop efiop requested a review from pared June 23, 2021 18:30
@efiop efiop added the optimize Optimizes DVC label Jun 23, 2021
@efiop efiop changed the title staging: remove redundant exists() call obj: staging: remove redundant exists() call Jun 23, 2021
Comment on lines -55 to -59
if not fs.exists(path_info):
raise FileNotFoundError(
errno.ENOENT, os.strerror(errno.ENOENT), path_info
)

Copy link
Contributor Author

@efiop efiop Jun 23, 2021

Choose a reason for hiding this comment

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

Some context: This was a temporary workaround for our old filesystems like S3FileSystem before we've migrated to s3fs. Now fs will just raise FileNotFoundError, so there is no need for this anymore thanks to great work by @isidentical πŸ™

@efiop efiop merged commit 53e9460 into iterative:master Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimize Optimizes DVC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants