URL: https://github.com/freeipa/freeipa/pull/394
Author: Akasurde
 Title: #394: Add fix for ipa plugins command
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/394/head:pr394
git checkout pr394
From eab5385725b104bfcba1091190bb281a1c980aa1 Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde <akasu...@redhat.com>
Date: Thu, 12 Jan 2017 18:38:37 +0530
Subject: [PATCH] Add fix for ipa plugins command

Fix adds count of plugins loaded to return dict

Fixes https://fedorahosted.org/freeipa/ticket/6513

Signed-off-by: Abhijeet Kasurde <akasu...@redhat.com>
---
 ipalib/misc.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ipalib/misc.py b/ipalib/misc.py
index 687b018..6366686 100644
--- a/ipalib/misc.py
+++ b/ipalib/misc.py
@@ -7,6 +7,7 @@
 from ipalib.output import Output, summary
 from ipalib import Flag
 from ipalib.plugable import Registry
+import six
 
 register = Registry()
 
@@ -124,8 +125,9 @@ def execute(self, **options):
             for plugin in self.api[namespace]():
                 cls = type(plugin)
                 key = '{}.{}'.format(cls.__module__, cls.__name__)
-                result.setdefault(key, []).append(namespace)
+                result.setdefault(key, []).append(six.text_type(namespace))
 
         return dict(
             result=result,
+            count=len(result),
         )
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to