summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)