pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0076-frontent-Add-summary-class-property-to-CommandOverri.patch

403b09
From 5b427134d613a49bcbd2fe89e7cac938d664b9e7 Mon Sep 17 00:00:00 2001
403b09
From: David Kupka <dkupka@redhat.com>
403b09
Date: Tue, 9 Aug 2016 17:03:25 +0200
403b09
Subject: [PATCH] frontent: Add summary class property to CommandOverride
403b09
403b09
Avoid creating instance of overriden command to get its summary.
403b09
403b09
https://fedorahosted.org/freeipa/ticket/6048
403b09
403b09
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
403b09
---
403b09
 ipaclient/frontend.py | 6 ++++++
403b09
 1 file changed, 6 insertions(+)
403b09
403b09
diff --git a/ipaclient/frontend.py b/ipaclient/frontend.py
403b09
index aeaed550771d3c6af04a9b34fcae414faacb47d7..587e31c89b3935984e799f7d4c500c652bcb5d43 100644
403b09
--- a/ipaclient/frontend.py
403b09
+++ b/ipaclient/frontend.py
403b09
@@ -127,6 +127,12 @@ class CommandOverride(Command):
403b09
     doc = classproperty(__doc_getter)
403b09
 
403b09
     @classmethod
403b09
+    def __summary_getter(cls):
403b09
+        return cls.__get_next().summary
403b09
+
403b09
+    summary = classproperty(__summary_getter)
403b09
+
403b09
+    @classmethod
403b09
     def __NO_CLI_getter(cls):
403b09
         return cls.__get_next().NO_CLI
403b09
 
403b09
-- 
403b09
2.7.4
403b09