Skip to contentSkip to conversation

conga/luci/utils luci_admin

Cluster-devel [email protected] 1 participant 1 message Aug 3, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-08-03 12:26:39

Modified files:
luci/utils : luci_admin

Log message:
fix a couple of restore bugs

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/utils/luci_admin.diff?cvsroot=cluster&r1=1.35&r2=1.36

luci/utils/luci_admin +5 -3
@@ -740,7 +740,8 @@
 
 			if hasattr(i[1], '__ac_local_roles__'):
 				roles = getattr(i[1], '__ac_local_roles__')
-				systems[i[0]]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items()))
+				if roles:
+					systems[i[0]]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items()))
 			else:
 				systems[i[0]]['permList'] = {}
 			
@@ -755,12 +756,13 @@
 
 			if hasattr(i[1], '__ac_local_roles__'):
 				roles = getattr(i[1], '__ac_local_roles__')
-				clusters[cluster_name]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items()))
+				if roles:
+					clusters[cluster_name]['permList'] = map(lambda x: x[0], filter(lambda x: len(x) > 1 and 'View' in x[1], roles.items()))
 			else:
 				clusters[cluster_name]['permList'] = {}
 
 			for csystem in i[1].objectItems():
-				csystem_hash = { 'id': csystem[0], 'permList': {} }
+				csystem_hash = { 'id': csystem[0] }
 
 				if hasattr(csystem[1], 'title'):
 					csystem_hash['title'] = getattr(csystem[1], 'title')