Default to argv=None for commands

This commit is contained in:
Florian Bruhin 2014-01-17 08:11:29 +01:00
parent 928bdbe160
commit 19d8202b01
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ class Command(QObject):
(self.nargs == '+' and len(argv) < 1)): (self.nargs == '+' and len(argv) < 1)):
raise TypeError("Invalid argument count!") raise TypeError("Invalid argument count!")
def run(self, argv): def run(self, argv=None):
if not self.signal: if not self.signal:
raise NotImplementedError raise NotImplementedError
self.signal.emit() self.signal.emit()

View File

@ -21,4 +21,4 @@ class KeyParser(QObject):
if cmd.nargs and cmd.nargs != 0: if cmd.nargs and cmd.nargs != 0:
self.set_cmd_text.emit(':{} '.format(cmd.name)) self.set_cmd_text.emit(':{} '.format(cmd.name))
else: else:
cmd.run([]) cmd.run()