Migliorie a default_channel_settings

This commit is contained in:
Alhaziel
2019-08-30 12:11:37 +02:00
parent f43cf32516
commit 2808024594
3 changed files with 40 additions and 7 deletions

View File

@@ -948,3 +948,8 @@ def channel_config(item, itemlist):
thumbnail=get_thumb('setting_0.png'))
)
def extract_wrapped(decorated):
from types import FunctionType
closure = (c.cell_contents for c in decorated.__closure__)
return next((c for c in closure if isinstance(c, FunctionType)), None)