Blob Blame History Raw
From 5139c4ad3a4601d0fc7204b46e2a889d44a79b36 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jcholast@redhat.com>
Date: Mon, 5 Sep 2016 10:18:13 +0200
Subject: [PATCH] cli: use full name when executing a command

Fixes the CLI not to always call the default version of a command even when
the version was explicitly specified.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
---
 ipalib/cli.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipalib/cli.py b/ipalib/cli.py
index d89a5320853ecf575c7ba710b2db2e62e1003141..df9e6cfd20fead7fd28667386c359db250e64b20 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -1101,7 +1101,7 @@ class cli(backend.Executioner):
         cmd = self.get_command(argv)
         if cmd is None:
             return
-        name = cmd.name
+        name = cmd.full_name
         kw = self.parse(cmd, argv[1:])
         if not isinstance(cmd, frontend.Local):
             self.create_context()
-- 
2.7.4