Skip to content

Comments

Raise error properly on failure to parse ics#1259

Merged
geier merged 2 commits intopimutils:masterfrom
magarnicle:patch-1
Jun 6, 2023
Merged

Raise error properly on failure to parse ics#1259
geier merged 2 commits intopimutils:masterfrom
magarnicle:patch-1

Conversation

@magarnicle
Copy link
Contributor

If cal_from_ics in icalendar.py raises a ValueError that is not to do with timezone issue, it will raise it instead of ignoring it and then generating "UnboundLocalError: local variable 'cal' referenced before assignment"

@geier
Copy link
Member

geier commented Jun 2, 2023

Good catch, thanks! Could you please add yourself to AUTHORS.txt, and -- if you have -- provide an example .ics file that triggers the issue? (I'd like to write a test to cover that case.)

If cal_from_ics in icalendar.py raises a ValueError that is not to do with timezone issue, it will raise it instead of ignoring it and then generating "UnboundLocalError: local variable 'cal' referenced before assignment"
@magarnicle
Copy link
Contributor Author

Sorry, should have read the contribution guildelines. I've added a test and the .ics from issue #1217

@geier
Copy link
Member

geier commented Jun 6, 2023

Awesome, thanks!

@geier geier merged commit 9509967 into pimutils:master Jun 6, 2023
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