Skip to content

Catch unsupported operation errors#16

Open
stsewd wants to merge 2 commits into
doyensec:masterfrom
stsewd:catch-unsoported-ops
Open

Catch unsupported operation errors#16
stsewd wants to merge 2 commits into
doyensec:masterfrom
stsewd:catch-unsoported-ops

Conversation

@stsewd

@stsewd stsewd commented Feb 9, 2024

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

sebix commented Apr 17, 2025

Copy link
Copy Markdown

@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