Skip to content

Catch unsupported operation errors #16

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stsewd
Copy link

@stsewd stsewd commented Feb 9, 2024

from_POSSESSIVE_REPEAT isn't supported yet, not sure how to implement it, but at least this doesn't interrupt the program.

@stsewd stsewd force-pushed the catch-unsoported-ops branch from 1e3650f to e7a123f Compare February 9, 2024 18:52
Comment on lines +42 to +48
try:
parsed = SreOpParser().parse_sre(
hooked_regex.pattern, hooked_regex.flags
)
except Exception as e:
print(f"Error parsing regex {hooked_regex.pattern} from {p}: {e}")
continue
Copy link

Choose a reason for hiding this comment

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

The same patch is also required for the yaml executable.

Copy link

Choose a reason for hiding this comment

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

I opened stsewd#1 to your repository, so it can end up in the same pull request here

@sebix
Copy link

sebix commented Apr 17, 2025

@b-c-ds could you please look at this / merge it and make a new release?

The patch is required to prevent the error AttributeError: 'SreOpParser' object has no attribute 'from_POSSESSIVE_REPEAT' from Python 3.11 onwards. Python 3.10 was the last release working without the patch.

sebix added a commit to sebix/intelmq that referenced this pull request Apr 17, 2025
sebix added a commit to sebix/intelmq that referenced this pull request Apr 17, 2025
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.

2 participants