summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-07-20 20:56:27 +0100
committerLars Wirzenius <liw@liw.fi>2011-07-20 20:56:27 +0100
commit976de7acf514742b109fc3c6f89e7fe889f47d9c (patch)
treeb647faa2bd5e65ffe7cdc61484f5b19c37ad5508
parentf0aa57ba24853d4f69012cf8af0f254c9096e46b (diff)
downloadunperish-976de7acf514742b109fc3c6f89e7fe889f47d9c.tar.gz
Adapt to cliapp version 0.14 new subcommand implementation.
-rwxr-xr-xunperish7
1 files 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)