From 23f0ba336b3f4cd84990835f6f1f50fc97b21618 Mon Sep 17 00:00:00 2001 From: donovan6000 Date: Fri, 4 Mar 2016 20:34:08 -0800 Subject: [PATCH 1/2] Only detects read/write access to the printer when using OS X or Linux --- octoprint_m3dfio/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/octoprint_m3dfio/__init__.py b/octoprint_m3dfio/__init__.py index 5c6e42c..c00e3cf 100644 --- a/octoprint_m3dfio/__init__.py +++ b/octoprint_m3dfio/__init__.py @@ -3976,8 +3976,8 @@ def on_printer_add_log(self, data) : connection = None time.sleep(1) - # Check if user lacks read/write access to the printer - if not os.access(currentPort, os.R_OK | os.W_OK) : + # Check if using OS X or Linux and the user lacks read/write access to the printer + if (platform.uname()[0].startswith("Darwin") or platform.uname()[0].startswith("Linux")) and not os.access(currentPort, os.R_OK | os.W_OK) : # Send message self._plugin_manager.send_plugin_message(self._identifier, dict(value = "Show Message", message = "You don't have read/write access to " + str(port), confirm = True)) @@ -7641,8 +7641,8 @@ def autoConnect(self, comm_instance, port, baudrate, read_timeout, *args, **kwar connection = None time.sleep(1) - # Check if user lacks read/write access to the printer - if not os.access(str(port), os.R_OK | os.W_OK) : + # Check if using OS X or Linux and the user lacks read/write access to the printer + if (platform.uname()[0].startswith("Darwin") or platform.uname()[0].startswith("Linux")) and not os.access(str(port), os.R_OK | os.W_OK) : # Send message self._plugin_manager.send_plugin_message(self._identifier, dict(value = "Show Message", message = "You don't have read/write access to " + str(port), confirm = True)) From 9b7e47134c4ebb321fa48a3bd9f724ea1dfbf6fa Mon Sep 17 00:00:00 2001 From: donovan6000 Date: Fri, 4 Mar 2016 21:18:29 -0800 Subject: [PATCH 2/2] V0.28.2 release --- Changelog | 4 ++++ setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 9608c0f..f968bb5 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,9 @@ Changelog: +V0.28.2 March 4, 2016 + + * Fixed read/write message error when using Windows + V0.28.1 March 4, 2016 * Fixed issue where the layer numbers shown in OctoPrint's G-code viewer would differ from those used in the mid-print filament change pre-processor stage diff --git a/setup.py b/setup.py index fbabdcb..1f533f8 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ plugin_identifier = "m3dfio" plugin_package = "octoprint_%s" % plugin_identifier plugin_name = "OctoPrint-M3DFio" -plugin_version = "0.28.1" +plugin_version = "0.28.2" plugin_description = "Makes OctoPrint fully compatible with the Micro 3D printer" plugin_author = "donovan6000" plugin_author_email = "donovan6000@exploitkings.com"