From 7c9b6bdbde8fc7e3fded9314ed674986f9e63ac0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 16 Jan 2014 15:59:57 +0100 Subject: [PATCH] Use objects in cmd_dict --- qutebrowser/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/commands.py b/qutebrowser/commands.py index 673287b78..e226a7a6d 100644 --- a/qutebrowser/commands.py +++ b/qutebrowser/commands.py @@ -16,7 +16,7 @@ class CommandParser(QObject): parts = text.strip().split() cmd = parts[0] args = parts[1:] - obj = cmd_dict[cmd]() + obj = cmd_dict[cmd] try: obj.check(args) except TypeError: @@ -32,7 +32,7 @@ class Command(QObject): @classmethod def bind(cls): if cls.name: - cmd_dict[cls.name] = cls + cmd_dict[cls.name] = cls() def check(self, *args): if ((isinstance(self.nargs, int) and len(args) != self.nargs) or