-
Notifications
You must be signed in to change notification settings - Fork 218
add locate_files function to filetools module #3485
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
Conversation
| def locate_files(files, paths, ignore_subdirs=None): | ||
| """ | ||
| Determine full path for list of files, in given list of paths (directories). | ||
| """ |
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.
Since the code seem to be strictly targeted at easyconfig files, the name and description should say so.
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.
Nothing in this function is specific to easyconfigs. I've renamed the ec_file local variable to filepath, maybe that made you reach that conclusion?
easybuild/tools/filetools.py
Outdated
| # try to load index for current path, or create one | ||
| path_index = load_index(path, ignore_dirs=ignore_subdirs) | ||
| if path_index is None or build_option('ignore_index'): | ||
| if os.path.exists(path): |
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.
This would probably be better to have before the log_debug, i.e. first check if the path exists at all and if not just skip it completely, i.e. "if not os.path.exists(path): next" or however that is done in python
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.
Very good point, fixed in bb18de4
|
@akesandgren Tackled or replied to remarks, please re-review |
akesandgren
left a comment
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
|
Going in, thanks @boegel! |
No description provided.