Hi,

this patch fixes <https://fedorahosted.org/freeipa/ticket/3489>.

Honza

--
Jan Cholasta
>From ee827fab8cb916ebf2d9b7d21ae4b6f93685e2b2 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Wed, 6 Mar 2013 10:20:18 +0100
Subject: [PATCH] Fix internal error in output_for_cli method of
 sudorule_{enable,disable}.

Also fix incorrect super method call in output_for_cli method of
sudorule_{add,remove}_option.

https://fedorahosted.org/freeipa/ticket/3489
---
 ipalib/plugins/sudorule.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index 0841457..3c89b7a 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -336,7 +336,7 @@ class sudorule_enable(LDAPQuery):
 
         return dict(result=True)
 
-    def output_for_cli(self, textui, result, cn):
+    def output_for_cli(self, textui, result, cn, **options):
         textui.print_dashed(_('Enabled Sudo Rule "%s"') % cn)
 
 api.register(sudorule_enable)
@@ -360,7 +360,7 @@ class sudorule_disable(LDAPQuery):
 
         return dict(result=True)
 
-    def output_for_cli(self, textui, result, cn):
+    def output_for_cli(self, textui, result, cn, **options):
         textui.print_dashed(_('Disabled Sudo Rule "%s"') % cn)
 
 api.register(sudorule_disable)
@@ -647,7 +647,7 @@ class sudorule_add_option(LDAPQuery):
     def output_for_cli(self, textui, result, cn, **options):
         textui.print_dashed(_('Added option "%(option)s" to Sudo Rule "%(rule)s"') % \
                 dict(option=options['ipasudoopt'], rule=cn))
-        super(sudorule_add_option, self).output_for_cli(textui, result, cn, options)
+        super(sudorule_add_option, self).output_for_cli(textui, result, cn, **options)
 
 
 
@@ -702,6 +702,6 @@ class sudorule_remove_option(LDAPQuery):
     def output_for_cli(self, textui, result, cn, **options):
         textui.print_dashed(_('Removed option "%(option)s" from Sudo Rule "%(rule)s"') % \
                 dict(option=options['ipasudoopt'], rule=cn))
-        super(sudorule_remove_option, self).output_for_cli(textui, result, cn, options)
+        super(sudorule_remove_option, self).output_for_cli(textui, result, cn, **options)
 
 api.register(sudorule_remove_option)
-- 
1.8.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to