From f84fc8aee3f0a2a241c3e90698603f7451ce8045 Mon Sep 17 00:00:00 2001 From: Jarek Szczepanski Date: Mon, 2 Jan 2017 01:10:47 +0100 Subject: [PATCH] Small fix for print time for cancelled prints --- octoprint_printhistory/eventHandler.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/octoprint_printhistory/eventHandler.py b/octoprint_printhistory/eventHandler.py index 95ca623..d7677c4 100644 --- a/octoprint_printhistory/eventHandler.py +++ b/octoprint_printhistory/eventHandler.py @@ -75,8 +75,8 @@ def eventHandler(self, event, payload): if "time" in payload: currentFile["printTime"] = payload["time"] else: - printTime = self._comm.getPrintTime() - currentFile["printTime"] = printTime if printTime is not None else "" + printTime = self._comm.getPrintTime() if self._comm is not None else "" + currentFile["printTime"] = printTime # when print happened and what was the result diff --git a/setup.py b/setup.py index c58d60f..a6f14ea 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ plugin_identifier = "printhistory" plugin_package = "octoprint_%s" % plugin_identifier plugin_name = "OctoPrint-PrintHistory" -plugin_version = "1.1.0" +plugin_version = "1.1.1" plugin_description = "Saves filename, print time and filament usage for each print" plugin_author = "Jarek Szczepanski" plugin_author_email = "imrahil@imrahil.com"