Skip to content

Commit c88c64a

Browse files
authored
Apprise decorator to remain backwards compatible after rework in #1368 (#1382)
1 parent 6a21495 commit c88c64a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apprise/decorators/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def send(
175175
result = self.__send(
176176
body,
177177
title,
178-
notify_type,
178+
notify_type.value,
179179
*args,
180180
meta=self._default_args,
181181
**kwargs,

tests/test_apprise_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,15 +2008,15 @@ def test_apprise_cli_plugin_loading(mock_post, tmpdir):
20082008
@notify(on="clihook")
20092009
def mywrapper(body, title, notify_type, *args, **kwargs):
20102010
# A simple test - print to screen
2011-
print("{}: {} - {}".format(notify_type.value, title, body))
2011+
print("{}: {} - {}".format(notify_type, title, body))
20122012
20132013
# No return (so a return of None) get's translated to True
20142014
20152015
# Define another in the same file
20162016
@notify(on="clihookA")
20172017
def mywrapper(body, title, notify_type, *args, **kwargs):
20182018
# A simple test - print to screen
2019-
print("!! {}: {} - {}".format(notify_type.value, title, body))
2019+
print("!! {}: {} - {}".format(notify_type, title, body))
20202020
20212021
# No return (so a return of None) get's translated to True
20222022
"""))

0 commit comments

Comments
 (0)