Default to argv=None for commands
This commit is contained in:
parent
928bdbe160
commit
19d8202b01
@ -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()
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user