thelastWallE / OctoprintKlipperPlugin

A plugin for a better integration of Klipper into OctoPrint.
GNU Affero General Public License v3.0
65 stars 14 forks source link

Implement further config validation #14

Closed ollyfg closed 3 years ago

ollyfg commented 4 years ago

Basically just parse the config file before we save it, ensuring that it can be parsed by configparser - the same parser used by Klipper.

This PR depends on the changes from https://github.com/AliceGrey/OctoprintKlipperPlugin/pull/8 in order to send a warning popup when validation fails. Feel free to take these changes and merge them into that PR if you like.

This will not validate any imported config files (ie. include foo.cfg), but since we're not editing them through this plugin I think that's probably out of scope.