Merge pull request #132 from carlallen/restore_port_for_31

Restore port config for 3.1
This commit is contained in:
Manuel83
2017-09-28 17:34:50 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -304,7 +304,11 @@ class CraftBeerPI(object):
self.sensor.init()
self.actor.init()
self.beep()
self._socketio.run(self._app, host='0.0.0.0', port=5000)
try:
port = int(cbpi.get_config_parameter('port', '5000'))
except ValueError:
port = 5000
self._socketio.run(self._app, host='0.0.0.0', port=port)
def beep(self):
self.buzzer.beep()