#25 Python 3 Compatibility

This commit is contained in:
David Zingg 2020-07-01 21:59:36 +02:00
parent 542a633559
commit 809369f783
2 changed files with 11 additions and 10 deletions

View File

@ -2,7 +2,8 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7e2e0eec-b22e-4d48-8f24-196d1ed9b51a" name="Default Changelist" comment=""> <list default="true" id="7e2e0eec-b22e-4d48-8f24-196d1ed9b51a" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/setup.py" beforeDir="false" afterPath="$PROJECT_DIR$/setup.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -47,13 +48,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1574193087583</updated> <updated>1574193087583</updated>
</task> </task>
<task id="LOCAL-00053" summary="#17 Logging zur Fehleranalyse eingebaut">
<created>1578938604039</created>
<option name="number" value="00053" />
<option name="presentableId" value="LOCAL-00053" />
<option name="project" value="LOCAL" />
<updated>1578938604039</updated>
</task>
<task id="LOCAL-00054" summary="#17 Logging zur Fehleranalyse eingebaut"> <task id="LOCAL-00054" summary="#17 Logging zur Fehleranalyse eingebaut">
<created>1578939868815</created> <created>1578939868815</created>
<option name="number" value="00054" /> <option name="number" value="00054" />
@ -390,7 +384,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1593631764282</updated> <updated>1593631764282</updated>
</task> </task>
<option name="localTasksCounter" value="102" /> <task id="LOCAL-00102" summary="#24 API Token Support">
<created>1593632006106</created>
<option name="number" value="00102" />
<option name="presentableId" value="LOCAL-00102" />
<option name="project" value="LOCAL" />
<updated>1593632006106</updated>
</task>
<option name="localTasksCounter" value="103" />
<servers /> <servers />
</component> </component>
<component name="UnknownFeatures"> <component name="UnknownFeatures">

View File

@ -168,7 +168,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
self._logger.info("Shutting down system with command: {command}".format(command=shutdown_command)) self._logger.info("Shutting down system with command: {command}".format(command=shutdown_command))
try: try:
import sarge import sarge
p = sarge.run(shutdown_command, async=True) p = sarge.run(shutdown_command, async_=True)
except Exception as e: except Exception as e:
self._logger.exception("Error when shutting down: {error}".format(error=e)) self._logger.exception("Error when shutting down: {error}".format(error=e))
return return