summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-06-03 23:25:16 -0600
committerkotfu <kotfu@kotfu.net>2018-06-03 23:25:16 -0600
commit7321cb97e8b2796882f1200b865771dfd441849b (patch)
treee0b697304c3702c1e77342d0e21899deeec495e1 /cmd2/cmd2.py
parent53164ef5e916213781097dc7a8109ac29e571d65 (diff)
downloadcmd2-git-7321cb97e8b2796882f1200b865771dfd441849b.tar.gz
preloop and postloop hooks must declare None return type
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index ba774f0b..0179de2b 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3129,8 +3129,8 @@ Script should contain one command per line, just like command would be typed in
cls._validate_callable_param_count(func, 0)
# make sure there is no return notation
signature = inspect.signature(func)
- if signature.return_annotation != signature.empty:
- raise TypeError('{} should not have a declared return type'.format(
+ if signature.return_annotation != None:
+ raise TypeError("{} must declare return a return type of 'None'".format(
func.__name__,
))