Skip to content

Commit

Permalink
fix/ support websocket-client >= 1.2.1
Browse files Browse the repository at this point in the history
core equivalent of MycroftAI/mycroft-messagebus-client#21
There was an incompability with the latest websocket-client and the
messagebus which needed fixing for Linux distro compatibility.

Since messagebus-client>=0.9.4 it also supports old websocket client versions this is now safe to do

This solves the issues surrounding licensing, see websocket-client/websocket-client#697
  • Loading branch information
PureTryOut authored and JarbasAl committed Sep 8, 2021
1 parent 21856e0 commit 5874a56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions mycroft/client/enclosure/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def open(self):
LOG.info('New Connection opened!')
self.synchronize()

def on_close(self):
def on_close(self, *args):
LOG.info('Closing {}'.format(id(self)))
GUIWebsocketHandler.clients.remove(self)

Expand Down Expand Up @@ -525,7 +525,11 @@ def synchronize(self):
})
namespace_pos += 1

def on_message(self, message):
def on_message(self, *args):
if len(args) == 1:
message = args[0]
else:
message = args[1]
LOG.info("Received: {}".format(message))
msg = json.loads(message)
if (msg.get('type') == "mycroft.events.triggered" and
Expand Down
2 changes: 1 addition & 1 deletion mycroft/version/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
CORE_VERSION_MINOR = 2
CORE_VERSION_BUILD = 0
SYNC_DATE = 20210830 # YYYYMMDD date of sync with mycroft-core
PATCH_VERSION = 8 # increment by 1 on every HolmesV release
PATCH_VERSION = 9 # increment by 1 on every HolmesV release
# set to 1 when SYNC_DATE changes
# END_VERSION_BLOCK

Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PyYAML==5.4

lingua-nostra>=0.4.4
mock_msm>=0.9.2
mycroft-messagebus-client==0.9.1
mycroft-messagebus-client>=0.9.4
adapt-parser==0.5.1
padatious==0.4.8
fann2==1.0.7
Expand Down

0 comments on commit 5874a56

Please sign in to comment.