mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Also feed the setting name when calling setting hook
This commit is contained in:
parent
9a7dc6d43e
commit
c029ccb7ad
1 changed files with 4 additions and 3 deletions
|
@ -264,7 +264,7 @@ def trigger_post_change_hook(setting_name, old_value, new_value):
|
|||
return
|
||||
|
||||
f = post_change_hooks[setting_name]
|
||||
f(old_value, new_value)
|
||||
f(setting_name, old_value, new_value)
|
||||
|
||||
|
||||
# ===========================================
|
||||
|
@ -273,14 +273,15 @@ def trigger_post_change_hook(setting_name, old_value, new_value):
|
|||
# You can define such an action with :
|
||||
#
|
||||
# @post_change_hook("your.setting.name")
|
||||
# def some_function_name(old_value, new_value):
|
||||
# def some_function_name(setting_name, old_value, new_value):
|
||||
# # Do some stuff
|
||||
#
|
||||
# ===========================================
|
||||
|
||||
|
||||
#@post_change_hook("example.int")
|
||||
#def myfunc(old_value, new_value):
|
||||
#def myfunc(setting_name, old_value, new_value):
|
||||
# print("In hook")
|
||||
# print(setting_name)
|
||||
# print(old_value)
|
||||
# print(new_value)
|
||||
|
|
Loading…
Add table
Reference in a new issue