]> git.llucax.com Git - software/pymin.git/commitdiff
Move handler decorator help checking to avoid an extra level in the stack trace.
authorLeandro Lucarella <llucax@gmail.com>
Sun, 30 Dec 2007 23:17:56 +0000 (21:17 -0200)
committerLeandro Lucarella <llucax@gmail.com>
Sun, 30 Dec 2007 23:17:56 +0000 (21:17 -0200)
pymin/dispatcher.py

index bde8603ed69b240281a926c6e1d7000d2ac15fa8..1e3d709cab97033904fa3b4f76b735a398587e08 100644 (file)
@@ -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