From 9fca47abaf3266bf02f361398490310cc1d67a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20W=C3=BCrthner?= <5859228+crysxd@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:06:53 +0200 Subject: [PATCH] Python 3.7 fix (#82) * Replace with Python 3.7 compatible syntax * Bump version to 2.1.1 --- octoapp/notificationutils.py | 6 +++++- setup.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/octoapp/notificationutils.py b/octoapp/notificationutils.py index 9b849a0..f026605 100644 --- a/octoapp/notificationutils.py +++ b/octoapp/notificationutils.py @@ -78,7 +78,11 @@ def processLine(line): # Do not read by line! We need to keep track of \r and \n because they are part of the filePos # later used. If read by line we do not know if \r\n or \n was used - while chunk := response.read(4096): + while True: + chunk = response.read(4096) + if not chunk: + break + buffer += chunk if type(chunk) == str else chunk.decode('utf-8') while '\n' in buffer: line, buffer = buffer.split('\n', 1) diff --git a/setup.py b/setup.py index 3b61ecb..450fdbc 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module # Note that this is also parsed by the moonraker module to pull the version, so the string and format must remain the same! -plugin_version = "2.1.0" +plugin_version = "2.1.1" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module