From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 22 Sep 2006 18:24:45 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ... Message-ID: <20060922182445.19881.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at sourceware.org 2006-09-22 18:24:45 Modified files: luci/site/luci/Extensions: cluster_adapters.py Log message: small tweaks Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.65&r2=1.66 --- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/09/14 21:24:25 1.65 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/09/22 18:24:45 1.66 @@ -972,7 +972,7 @@ hmap['resource_list'] = resource_list hmap['root_uuid'] = root_uuid - hmap['uuid_list'] = map(lambda x: make_uuid('resource'), range(30)) + hmap['uuid_list'] = map(lambda x: make_uuid('resource'), xrange(30)) return hmap def recurse_resources(parent_uuid, child, resource_list, indent_ctr, parent=None): @@ -997,13 +997,13 @@ rc_map['uuid'] = make_uuid('resource') rc_map['parent_uuid'] = parent_uuid - new_indent_ctr = indent_ctr + 1 - resource_list.append(rc_map) kids = child.getChildren() child_depth = 0 + new_indent_ctr = indent_ctr + 1 for kid in kids: - child_depth = recurse_resources(rc_map['uuid'], kid, resource_list, new_indent_ctr, child) + cdepth = recurse_resources(rc_map['uuid'], kid, resource_list, new_indent_ctr, child) + child_depth = max(cdepth, child_depth) rc_map['max_depth'] = child_depth return child_depth + 1