From f7022ba88fba67217b0ab67c73f5f223b6a4f83d Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 30 Dec 2007 21:17:56 -0200 Subject: [PATCH] Move handler decorator help checking to avoid an extra level in the stack trace. --- pymin/dispatcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymin/dispatcher.py b/pymin/dispatcher.py index bde8603..1e3d709 100644 --- a/pymin/dispatcher.py +++ b/pymin/dispatcher.py @@ -163,9 +163,9 @@ def handler(help): help - Help string for the handler. """ + if not help: + raise TypeError("'help' should not be empty") def wrapper(f): - if not help: - raise TypeError("'help' should not be empty") f._dispatcher_handler = True f.handler_help = help return f -- 2.43.0