Print command name in ArgumentCountException
This commit is contained in:
parent
274608b1d9
commit
d1f921cc39
@ -108,8 +108,8 @@ class Command(QObject):
|
|||||||
argcnt = '{}-inf'.format(self.nargs[0])
|
argcnt = '{}-inf'.format(self.nargs[0])
|
||||||
else:
|
else:
|
||||||
argcnt = '{}-{}'.format(self.nargs[0], self.nargs[1])
|
argcnt = '{}-{}'.format(self.nargs[0], self.nargs[1])
|
||||||
raise ArgumentCountError("{} args expected, but got {}".format(
|
raise ArgumentCountError("{}: {} args expected, but got {}".format(
|
||||||
argcnt, len(args)))
|
self.name, argcnt, len(args)))
|
||||||
|
|
||||||
def run(self, args=None, count=None):
|
def run(self, args=None, count=None):
|
||||||
"""Run the command.
|
"""Run the command.
|
||||||
|
Loading…
Reference in New Issue
Block a user