exit(0)
cmd = load_command(group, unparsed)
+ # Find the most specific subcommand
+ for term in list(unparsed):
+ if cmd.is_command:
+ break
+ if cmd.contains(term):
+ cmd = cmd.get_subcmd(term)
+ unparsed.remove(term)
+
if _help or not cmd.is_command:
if cmd.has_description:
parser.description = cmd.help
else:
try:
- parser.description\
- = _commands.get_closest_ancestor_command(cmd.path).help
+ parser.description =\
+ _commands.get_closest_ancestor_command(cmd.path).help
except KeyError:
parser.description = ' '
parser.prog = '%s %s ' % (exe, cmd.path.replace('_', ' '))
def set_description(self, path, description):
self._all_commands[path].help = description
- def get_descitpion(self, path):
+ def get_description(self, path):
return self._all_commands[path].help
def set_class(self, path, cmd_class):
or self.config.get('global', 'token')
self.base_url = self.config.get('quotaholder', 'url')\
or self.config.get('global', 'url')
- self.client = QuotaHolderClient(self.base_url, self.token)
+ #self.client = QuotaHolderClient(self.base_url, self.token)
+ print(self.__class__)
@command()
class quotaholder_test_specific(_quotaholder_init):
- """Test quota holder commands - devel/testing only"""
+ """quotaholder test specific"""
- def main(self):
+ def main(self, specify):
super(self.__class__, self).main()
- print('We will test quota holder stuff')
- r = self.client.test_quota()
- print('That is what we got {%s}' % r)
@command()
class quotaholder_test_all(_quotaholder_init):
- """Test quota holder commands - devel/testing only"""
+ """quotaholder test all"""
def main(self):
super(self.__class__, self).main()
- print('We will test quota holder stuff')
- r = self.client.test_quota()
- print('That is what we got {%s}' % r)
@command()
-class quotaholder_test(_quotaholder_init):
- """Test quota holder commands - devel/testing only"""
+class quotaholder_test_me(_quotaholder_init):
+ """quotaholder test"""
- def main(self):
+ def main(self, who='you'):
super(self.__class__, self).main()
- print('We will test quota holder stuff')
- r = self.client.test_quota()
- print('That is what we got {%s}' % r)