From: Leandro Lucarella Date: Sun, 30 Dec 2007 23:17:56 +0000 (-0200) Subject: Move handler decorator help checking to avoid an extra level in the stack trace. X-Git-Url: https://git.llucax.com/software/pymin.git/commitdiff_plain/f7022ba88fba67217b0ab67c73f5f223b6a4f83d Move handler decorator help checking to avoid an extra level in the stack trace. --- 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