The Identity, Policy and Audit system
CentOS Sources
2016-11-03 403b09ab980c02ef36095973349a13e0181c794a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 5b427134d613a49bcbd2fe89e7cac938d664b9e7 Mon Sep 17 00:00:00 2001
From: David Kupka <dkupka@redhat.com>
Date: Tue, 9 Aug 2016 17:03:25 +0200
Subject: [PATCH] frontent: Add summary class property to CommandOverride
 
Avoid creating instance of overriden command to get its summary.
 
https://fedorahosted.org/freeipa/ticket/6048
 
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
---
 ipaclient/frontend.py | 6 ++++++
 1 file changed, 6 insertions(+)
 
diff --git a/ipaclient/frontend.py b/ipaclient/frontend.py
index aeaed550771d3c6af04a9b34fcae414faacb47d7..587e31c89b3935984e799f7d4c500c652bcb5d43 100644
--- a/ipaclient/frontend.py
+++ b/ipaclient/frontend.py
@@ -127,6 +127,12 @@ class CommandOverride(Command):
     doc = classproperty(__doc_getter)
 
     @classmethod
+    def __summary_getter(cls):
+        return cls.__get_next().summary
+
+    summary = classproperty(__summary_getter)
+
+    @classmethod
     def __NO_CLI_getter(cls):
         return cls.__get_next().NO_CLI
 
-- 
2.7.4