Skip to content
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

Fix KeyError in onHeartbeat function #56

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

galadril
Copy link
Contributor

@galadril galadril commented Dec 11, 2024

Fixes #45

Fix the KeyError 'examples' in the onHeartbeat function in plugin.py.

  • Add a check to ensure the key exists in self.plugindata before accessing it in CheckForUpdatePythonPlugin function.
  • Log an appropriate error message and skip the update check for the plugin if the key does not exist.
  • Add similar checks in UpdatePythonPlugin and CheckForUpdatePythonPlugin functions to handle missing keys.
  • Add debug messages for better logging and error handling.

For more details, open the Copilot Workspace session.

Fixes #45

Fix the KeyError 'examples' in the `onHeartbeat` function in `plugin.py`.

* Add a check to ensure the key exists in `self.plugindata` before accessing it in `CheckForUpdatePythonPlugin` function.
* Log an appropriate error message and skip the update check for the plugin if the key does not exist.
* Add similar checks in `UpdatePythonPlugin` and `CheckForUpdatePythonPlugin` functions to handle missing keys.
* Add debug messages for better logging and error handling.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ycahome/pp-manager/issues/45?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link
Owner

@ycahome ycahome left a comment

Choose a reason for hiding this comment

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

Fix KeyError in onHeartbeat function

@ycahome ycahome merged commit 372a7ad into ycahome:master Dec 19, 2024
@galadril galadril deleted the fix-keyerror branch December 19, 2024 07:26
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.

KeyError: 'examples'
2 participants