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

Fix check_suffix() #4712

Merged
merged 1 commit into from
Sep 8, 2021
Merged

Fix check_suffix() #4712

merged 1 commit into from
Sep 8, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 8, 2021

Fix a bug in #4711 when file=''

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved file suffix checking in utility functions.

πŸ“Š Key Changes

  • Modified check_suffix logic to require a non-empty file parameter.
  • Made check_suffix call in check_file optional.

🎯 Purpose & Impact

  • These changes ensure that file checks only proceed if a file name is provided, preventing unnecessary checks on empty strings or None.
  • The update will result in cleaner code and potentially avoid errors where incorrect file paths might have been accepted.
  • Users should experience more robust file handling, especially when dealing with model weights and configuration files. πŸ› οΈπŸ“

Fix a bug when `file=''`
@glenn-jocher glenn-jocher self-assigned this Sep 8, 2021
@glenn-jocher glenn-jocher merged commit f984cce into master Sep 8, 2021
@glenn-jocher glenn-jocher deleted the fix/check_suffix branch September 8, 2021 13:06
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
Fix a bug when `file=''`
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Fix a bug when `file=''`
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.

1 participant