Skip to contentSkip to conversation

conga/luci/utils luci_admin

Cluster-devel [email protected] 1 participant 1 message Jul 26, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-07-26 01:17:18

Modified files:
luci/utils : luci_admin

Log message:
fix problem of zope choking on nonexistent directories in the product path

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

luci/utils/luci_admin +7 -8
@@ -21,13 +21,13 @@
 ))
 
 from Products import __path__
-__path__.extend((
-	'/usr/lib/luci/zope/lib/python/Products',
-	'/usr/lib64/luci/zope/lib/python/Products',
-	'/usr/lib64/zope/lib/python/Products',
-	'/usr/lib64/zope/lib64/python/Products',
-	'/usr/lib/zope/lib/python/Products'
-))
+for i in [	'/usr/lib/luci/zope/lib/python/Products',
+			'/usr/lib64/luci/zope/lib/python/Products',
+			'/usr/lib64/zope/lib/python/Products',
+			'/usr/lib64/zope/lib64/python/Products',
+			'/usr/lib/zope/lib/python/Products'			]:
+	if os.path.isdir(i):
+		__path__.append(i)
 
 LUCI_INIT_DEBUG = 0
 
@@ -223,7 +223,6 @@
 		return -1
 
 	if True:
-		print app.unrestrictedTraverse('/luci/')
 		portal_mem = app.unrestrictedTraverse('/luci/portal_membership')
 		portal_reg = app.unrestrictedTraverse('/luci/portal_registration')
 		if not portal_mem or not portal_reg: