summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cliff/command.py7
-rw-r--r--cliff/display.py6
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.