diff options
author | Dean Troyer <dtroyer@gmail.com> | 2012-06-01 11:08:51 -0500 |
---|---|---|
committer | Dean Troyer <dtroyer@gmail.com> | 2012-06-01 11:08:51 -0500 |
commit | 62724e12dc51b054a8f7f5698749cb464b7b873c (patch) | |
tree | cece183b67c8a4bfce55ee2601fb9d4c54dfc6ad | |
parent | 748ef2b230588c66e240ceb93471b0ceaeca1f8e (diff) | |
download | cliff-tablib-62724e12dc51b054a8f7f5698749cb464b7b873c.tar.gz |
Move take_action() to Command
-rw-r--r-- | cliff/command.py | 7 | ||||
-rw-r--r-- | cliff/display.py | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/cliff/command.py b/cliff/command.py index 7ff526e..e369988 100644 --- a/cliff/command.py +++ b/cliff/command.py @@ -32,6 +32,13 @@ class Command(object): return parser @abc.abstractmethod + def take_action(self, parsed_args): + """Return a two-part tuple with a tuple of column names + and a tuple of values. + """ + def run(self, parsed_args): """Do something useful. """ + self.take_action(parsed_args) + return 0 diff --git a/cliff/display.py b/cliff/display.py index 6d9f522..9dd2718 100644 --- a/cliff/display.py +++ b/cliff/display.py @@ -70,12 +70,6 @@ class DisplayCommandBase(Command): return parser @abc.abstractmethod - def take_action(self, parsed_args): - """Return a two-part tuple with a tuple of column names - and a tuple of values. - """ - - @abc.abstractmethod def produce_output(self, parsed_args, column_names, data): """Use the formatter to generate the output. |