From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 3 Aug 2006 12:26:39 -0000 Subject: [Cluster-devel] conga/luci/utils luci_admin Message-ID: <20060803122639.5475.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-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 --- conga/luci/utils/luci_admin 2006/08/03 03:58:23 1.35 +++ conga/luci/utils/luci_admin 2006/08/03 12:26:38 1.36 @@ -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')