From 088d35c0aab160c500135ddbcdcf70661fc92d0a Mon Sep 17 00:00:00 2001 From: Anael Beutot <anael.beutot@smartjog.com> Date: Thu, 3 May 2012 17:40:20 +0200 Subject: [PATCH] Added tag decorators for introspection. --- ccnode/tags.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ccnode/tags.py b/ccnode/tags.py index 372143e..40f162c 100644 --- a/ccnode/tags.py +++ b/ccnode/tags.py @@ -112,6 +112,21 @@ def tag_inspector(mod, parent=None): return tags +# decorators for tag inspector +def ttl(value): + def decorator(func): + func.ttl = value + return func + return decorator + + +def refresh(value): + def decorator(func): + func.refresh = value + return func + return decorator + + def get_tags(tags_dict, tags=None, noresolve_tags=None): """Helper to get tags. -- GitLab