diff options
Diffstat (limited to 'xnt/__init__.py')
-rw-r--r-- | xnt/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xnt/__init__.py b/xnt/__init__.py index 61de895..767c2b7 100644 --- a/xnt/__init__.py +++ b/xnt/__init__.py @@ -60,10 +60,13 @@ def target(target_fn): build file as a "target" method, or a method meant to be invoked from Xnt """ + has_run = [False,] def wrap(): """Inner wrapper function for decorator""" - print(target_fn.__name__ + ":") - return target_fn() + if not has_run[0]: + has_run[0] = True + print(target_fn.__name__ + ":") + return target_fn() wrap.decorator = "target" wrap.__doc__ = target_fn.__doc__ return wrap |