diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0c10d0c8..7ef0a5fd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ TBD - Add support to change the Exchange Type for RabbitMQ. Default is 'topic', but options like 'fanout' can now be supported - Better handling of Pika errors +- Updated how AutoBrewtils maps functions, and will skip auto marking commands with annotations 3.22.0 ------ diff --git a/brewtils/auto_decorator.py b/brewtils/auto_decorator.py index 1c4f3b25..b4fc7f64 100644 --- a/brewtils/auto_decorator.py +++ b/brewtils/auto_decorator.py @@ -24,10 +24,12 @@ def updateClientClass(self, client, name=None, version=None): def addFunctions(self, client): for func in dir(client): if callable(getattr(client, func)): - if not func.startswith("_"): - _wrapped = getattr(client, func) - + _wrapped = getattr(client, func) + if not hasattr(_wrapped, "_command") and not func.startswith("__"): # decorators.py will handle all of the markings - _wrapped._command = Command() + if func.startswith("_"): + _wrapped._command = Command(hidden=True) + else: + _wrapped._command = Command() return client