From 976de7acf514742b109fc3c6f89e7fe889f47d9c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 20 Jul 2011 20:56:27 +0100 Subject: Adapt to cliapp version 0.14 new subcommand implementation. --- unperish | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/unperish b/unperish index 44ba511..e445582 100755 --- a/unperish +++ b/unperish @@ -82,13 +82,12 @@ class Unperish(cliapp.Application): except IOError: pass - cmd_methods = self._subcommands() - method = self._normalize_cmd(subcommand) - if method in cmd_methods: + if subcommand in self._subcommands: + method = self._subcommands[subcommand] if self.settings['verbose']: self.output.write('command: %s\n' % subcommand) if not self.settings['no-act']: - getattr(self, method)([]) + method([]) else: raise cliapp.AppException('unknown command %s' % subcommand) -- cgit v1.2.1