Skip to content

Fix a bug in loading davobject#506

Merged
tobixen merged 2 commits into
python-caldav:masterfrom
zealseeker:master
Jun 11, 2025
Merged

Fix a bug in loading davobject#506
tobixen merged 2 commits into
python-caldav:masterfrom
zealseeker:master

Conversation

@zealseeker
Copy link
Copy Markdown
Contributor

To solve the issue #505

  1. Removed vcal.fix as it has been implemented in _set_data
  2. Return load_by_multiget() when GET fails.

@tobixen
Copy link
Copy Markdown
Member

tobixen commented Jun 11, 2025

You stil need to set self.data=r.raw.

And also, does this work for you? I ran the test code towards all the servers I had access to without hitting this problem, so I can't test this myself. (What calendar server do you use?)

@zealseeker
Copy link
Copy Markdown
Contributor Author

@tobixen OK. I've added it. Since 'r' may not be assigned when an excpetion is catched, I add it in the try block. Please check whether it is fine.

I am using Lark (named Feishu in China) and have the same problem as #459

@tobixen
Copy link
Copy Markdown
Member

tobixen commented Jun 11, 2025

Right. I was testing towards Lark at some point - but that was after my last change.

I think this looks good.

@tobixen
Copy link
Copy Markdown
Member

tobixen commented Jun 11, 2025

Some comments:

  • With the return-statement now, code after the try-except-block should only run if there are no exceptions, so r will always be set.
  • The next lines also depends on r

Hence it doesn't really matter if self.data = r.raw is inside or outside the try-block.

@tobixen tobixen merged commit 949df4f into python-caldav:master Jun 11, 2025
7 checks passed
mamogaaa pushed a commit to mamogaaa/caldav that referenced this pull request Jul 2, 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