Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 226

Control si un elemento de una lista no existe

Ver diferencias:

controlies/trunk/applications/controlies/modules/Hosts.py
page = int(args['page'])
start = limit * page - limit
finish = start + limit;
print args
# sort by field
sortBy = args['sidx']
#if sortBy == "uid":
......
search = self.ldap.search("dc="+self.domainname+",ou=hosts","dc=*",["dc","aRecord"])
for s in search:
if s[0][1]['dc'][0] in hostnames:
hostnames_data[s[0][1]['dc'][0]]["ip"] = s[0][1]['aRecord'][0]
if s[0][1]['dc'][0] in hostnames_data:
if s[0][1]['dc'][0] in hostnames:
hostnames_data[s[0][1]['dc'][0]]["ip"] = s[0][1]['aRecord'][0]
rows = []

Exportar a: Unified diff