From 319ea242da815c0a2d13009f455f281fcfea68d4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 14 Sep 2014 22:46:48 +0200 Subject: [PATCH] cmdutils: raise TypeError instead of ValueError. --- qutebrowser/commands/cmdutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/commands/cmdutils.py b/qutebrowser/commands/cmdutils.py index 8f094d98b..5e77aeaca 100644 --- a/qutebrowser/commands/cmdutils.py +++ b/qutebrowser/commands/cmdutils.py @@ -222,8 +222,8 @@ class register: # pylint: disable=invalid-name type_conv = {} signature = inspect.signature(self.func) if 'self' in signature.parameters and self.instance is None: - raise ValueError("{} is a class method, but instance was not " - "given!".format(self.name[0])) + raise TypeError("{} is a class method, but instance was not " + "given!".format(self.name[0])) has_count = 'count' in signature.parameters doc = inspect.getdoc(self.func) if doc is not None: