Skip to content

Commit

Permalink
allow override of empty DecoratorSet
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
  • Loading branch information
andrewwhitehead committed Jul 18, 2019
1 parent f7b07ee commit cb26658
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aries_cloudagent/messaging/agent_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def __init__(self, _id: str = None, _decorators: BaseDecoratorSet = None):
else:
self._message_id = str(uuid.uuid4())
self._message_new_id = True
self._message_decorators = _decorators or DecoratorSet()
self._message_decorators = (
_decorators if _decorators is not None else DecoratorSet()
)
if not self.Meta.message_type:
raise TypeError(
"Can't instantiate abstract class {} with no message_type".format(
Expand Down

0 comments on commit cb26658

Please sign in to comment.