Skip to content

Commit

Permalink
Fixed bug where Client wasn't set in Plugin (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog authored Mar 11, 2024
1 parent 4cb4e38 commit 579a53e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Brewtils Changelog
==================

3.24.4
------
TBD

- Fixed bug client passed into Plugin would not initialize the commands for Remote Plugins

3.24.3
------
3/8/2024
Expand Down
6 changes: 4 additions & 2 deletions brewtils/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ def __init__(self, client=None, system=None, logger=None, **kwargs):
global CLIENT
# Make sure this is set after self._system
if client:
self._client = client
CLIENT = client
self._set_client(client)
else:
self._client = None

Expand Down Expand Up @@ -272,6 +271,9 @@ def client(self, new_client):
if new_client is None:
return

self._set_client(new_client)

def _set_client(self, new_client):
# Several _system properties can come from the client, so update if needed
if not self._system.name:
self._system.name = getattr(new_client, "_bg_name") # noqa
Expand Down

0 comments on commit 579a53e

Please sign in to comment.