[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]