diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-17 21:05:03 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-17 21:05:03 -0600 |
commit | 721982870ed6dd5507a634d09dd06309abc3778a (patch) | |
tree | 966933871ad812bb06d7571807fa5f89f19819d9 /ipalib/cli.py | |
parent | f1eb74e22cadf3a9f4ac991e0f8b922f6fb56d1e (diff) | |
download | freeipa.git-721982870ed6dd5507a634d09dd06309abc3778a.tar.gz freeipa.git-721982870ed6dd5507a634d09dd06309abc3778a.tar.xz freeipa.git-721982870ed6dd5507a634d09dd06309abc3778a.zip |
Removed generic Command.output_for_cli() method; CLI.run_interactive() now only calls output_for_cli() if it has been implemented
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r-- | ipalib/cli.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index 07956e0a..7148afc1 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -301,7 +301,9 @@ class CLI(object): break except errors.ValidationError, e: error = e.error - cmd.output_for_cli(cmd(**kw)) + ret = cmd(**kw) + if callable(cmd.output_for_cli): + cmd.output_for_cli(ret) def parse(self, cmd, argv): parser = self.build_parser(cmd) |