[Freeipa-devel] [PATCH] 059 Use unicode parameters in the host plugin

Jakub Hrozek jhrozek at redhat.com
Thu Feb 17 10:10:52 UTC 2011


On Thu, Feb 17, 2011 at 11:06:35AM +0100, Jan Zelený wrote:
> Jan Zelený <jzeleny at redhat.com> wrote:
> > Jakub Hrozek <jhrozek at redhat.com> wrote:
> > > While reviewing Rob's latest patch I found out that we didn't convert to
> > > unicode on couple of places in the host plugin.
> > 
> > ack
> 
> On a second thoughts - maybe the _get_unicode_reverse_zone isn't necessary at 
> all - is it possible to do this change directly at the get_reverse_zone?
> 
> Jan
> 

attached.

also removed a line of dead code.
-------------- next part --------------
>From 96b1342c815435d505be246478f22f902cab6250 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Wed, 16 Feb 2011 10:33:24 -0500
Subject: [PATCH] Use unicode parameters in the host plugin

https://fedorahosted.org/freeipa/ticket/977
---
 ipaserver/install/bindinstance.py |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index ea9280b..e005653 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -108,7 +108,7 @@ def get_reverse_zone(ip_address_str):
     else:
         raise ValueError('Bad address format?')
 
-    return zone, name
+    return unicode(zone), unicode(name)
 
 def dns_zone_exists(name):
     try:
@@ -276,8 +276,6 @@ class BindInstance(service.Service):
         else:
             self.zonemgr = 'root.%s.%s' % (self.host, self.domain)
 
-        self.reverse_subnet, self.reverse_host = get_reverse_zone(ip_address)
-
         self.__setup_sub_dict()
 
     def create_sample_bind_zone(self):
-- 
1.7.4



More information about the Freeipa-devel mailing list