From 2d6aadf510e642d4b0f7d34daf296e4505639aa9 Mon Sep 17 00:00:00 2001 From: thelastWallE <12502210+thelastWallE@users.noreply.github.com> Date: Sun, 4 Apr 2021 09:22:45 +0200 Subject: [PATCH] Fix for doublesection error exception --- octoprint_klipper/__init__.py | 8 ++++---- setup.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/octoprint_klipper/__init__.py b/octoprint_klipper/__init__.py index 207de27..ac233ad 100644 --- a/octoprint_klipper/__init__.py +++ b/octoprint_klipper/__init__.py @@ -551,6 +551,9 @@ class KlipperPlugin( dataToValidated.readfp(buf) else: dataToValidated.read_string(dataToBeValidated) + except configparser.DuplicateSectionError: + self._parsing_check_response = True + pass except configparser.Error as error: if sys.version_info[0] < 3: error.message = error.message.replace("\\n","") @@ -571,10 +574,7 @@ class KlipperPlugin( "You can reload your last changes\n" + "on the 'Klipper Configuration' tab.\n\n" + str(error)) self._parsing_check_response = False - return - else: - self._parsing_check_response = True - return + return #incorrectlines = [] # for section in dataToValidated.sections(): diff --git a/setup.py b/setup.py index 96482ba..22301e7 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ plugin_package = "octoprint_klipper" plugin_name = "OctoKlipper" -plugin_version = "0.3.7" +plugin_version = "0.3.7.1" plugin_description = """A plugin for OctoPrint to configure,control and monitor the Klipper 3D printer software."""