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

Do not crash for dynamically created macros with no config. #1123

Closed
wants to merge 1 commit into from

Conversation

viesturz
Copy link

I'm experimenting with auto-generated T0,T1... macros.
And fluidd just dies if macros do not have a printer config section.
This is a basic fix to avoid that.

@pedrolamas
Copy link
Member

Hi @viesturz, thank you for opening this Pull Request.

Code-wise this looks fine to me, and I see no problem with it, but I am failing to see how this would ever happen... I mean, how can you create a macro without it being on the config file?

@viesturz
Copy link
Author

viesturz commented Jul 20, 2023 via email

@pedrolamas
Copy link
Member

Using a Klipper extension. In my case - this: viesturz/klipper@3e9aa4d

This is not mainland Klipper, so that explains the behavior. Personally, I'm always skeptical of adding ad-hoc support for unknown extensions.

At first glance, I don't see the changes on this particular PR becoming an issue, but these kind of solutions can become a problem when we do code changes/refactoring as we do not test with non-mainland Klipper code and so this could easily get lost...

@viesturz
Copy link
Author

viesturz commented Jul 21, 2023 via email

@viesturz
Copy link
Author

viesturz commented Jul 21, 2023 via email

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