python/samba/netcmd: changes for samab.tests.samba_tool.computer
[samba.git] / python / samba / samdb.py
index 0b80c9c878ee1941d5deb68876fd96d2f0b875dc..fa3e4b1b33405a41849fcf766bdcae389b8885de 100644 (file)
@@ -743,7 +743,7 @@ accountExpires: %u
     def host_dns_name(self):
         """return the DNS name of this host"""
         res = self.search(base='', scope=ldb.SCOPE_BASE, attrs=['dNSHostName'])
-        return res[0]['dNSHostName'][0]
+        return str(res[0]['dNSHostName'][0])
 
     def domain_dns_name(self):
         """return the DNS name of the domain root"""
@@ -1048,12 +1048,12 @@ schemaUpdateNow: 1
     def get_dsServiceName(self):
         '''get the NTDS DN from the rootDSE'''
         res = self.search(base="", scope=ldb.SCOPE_BASE, attrs=["dsServiceName"])
-        return res[0]["dsServiceName"][0]
+        return str(res[0]["dsServiceName"][0])
 
     def get_serverName(self):
         '''get the server DN from the rootDSE'''
         res = self.search(base="", scope=ldb.SCOPE_BASE, attrs=["serverName"])
-        return res[0]["serverName"][0]
+        return str(res[0]["serverName"][0])
 
     def dns_lookup(self, dns_name, dns_partition=None):
         '''Do a DNS lookup in the database, returns the NDR database structures'''