Fix warning message on client side

Add message about only on server side.

https://fedorahosted.org/freeipa/ticket/4793

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Martin Basti 2014-12-16 13:02:12 +01:00 committed by Martin Kosek
parent d5035c0ed9
commit 9cbbcadd04

View File

@ -437,7 +437,9 @@ class Command(HasParam):
self.validate(**params)
(args, options) = self.params_2_args_options(**params)
ret = self.run(*args, **options)
if not version_provided and isinstance(ret, dict):
if (not version_provided and isinstance(ret, dict) and
self.api.env.in_server):
# add message only on server side
messages.add_message(
API_VERSION, ret,
messages.VersionMissing(server_version=API_VERSION))