Open
Conversation
added 4 commits
December 30, 2025 11:49
…in cases where RULES path is not a git repo
…in cases where RULES path is not a git repo
- Fixed indentation errors. - Corrected misleading comments. - Implemented non-blocking updates: the loop now continues to process other repositories even if one fails.
Collaborator
|
I'll take a look at the test run failures once I'm back at work |
aarontp
reviewed
Jan 6, 2026
Member
aarontp
left a comment
There was a problem hiding this comment.
Overall LGTM, but some of the indentation needs to be updated.
| log.info('Yara rules cloned successfully.') | ||
| except git.exc.GitCommandError as e: | ||
| log.error('Error cloning Yara rules from {0:s}: {1!s}'.format(repo, e)) | ||
| update_success = False |
Member
There was a problem hiding this comment.
Looks like this has incorrect indentation
| log.error( | ||
| 'InvalidGitRepositoryError updating rules in %s: %s', path, str(e), | ||
| exc_info=True) | ||
| update_success = False |
Member
There was a problem hiding this comment.
Couple more lines that need indentation fixes here/below too.
Member
|
FYI, tests should be fixed in #1602, so just need to wait until that is submitted and then merge that here. |
Member
|
If you merge the current head I think the tests should pass now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
This PR updates the _update_rules logic to handle edge cases. It fixes Yara rule pull updates, which currently fail to update when this function is run on a non-git directory.
git.cloneto fetch it.InvalidGitRepositoryErrorto prevent crashes if the directory exists but is not a git repo.Applicable issues
N/A
Additional information
Nay
Checklist
pip install -r dfvfs_requirements.txtthat may have included [No] module named 'coverage'