Skip to content

Commit

Permalink
additional python 3 compatibility bugs, jneilliii#25
Browse files Browse the repository at this point in the history
  • Loading branch information
jneilliii committed Feb 3, 2021
1 parent 5d49624 commit cae2057
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions octoprint_rtmpstreamer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def on_after_startup(self):
self.container = self.client.containers.get('RTMPStreamer')
self._logger.info("%s is streaming " % self.container.name)
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=True))
except Exception, e:
except Exception as e:
self._logger.error(str(e))
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=False))

Expand Down Expand Up @@ -96,7 +96,7 @@ def startStream(self):
try:
self.container = self.client.containers.run("octoprint/rtmpstreamer:latest",command=[self._settings.global_get(["webcam","stream"]),self._settings.get(["stream_resolution"]),self._settings.get(["stream_framerate"]),self._settings.get(["stream_url"]),",".join(filters)],detach=True,privileged=False,devices=["/dev/vchiq"],name="RTMPStreamer",auto_remove=True,network_mode="host")
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=True))
except Exception, e:
except Exception as e:
self._plugin_manager.send_plugin_message(self._identifier, dict(error=str(e),status=True,streaming=False))

def stopStream(self):
Expand All @@ -105,7 +105,7 @@ def stopStream(self):
self.container.stop()
self.container = None
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=False))
except Exception, e:
except Exception as e:
self._plugin_manager.send_plugin_message(self._identifier, dict(error=str(e),status=True,streaming=False))
else:
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=False))
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
###

.
docker==2.7.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "RTMP Streamer"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.5rc1"
plugin_version = "0.1.5rc2"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit cae2057

Please sign in to comment.