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

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



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-10-11 21:48:04

Modified files:
	luci/site/luci/Extensions: homebase_adapters.py clusterOS.py 

Log message:
	workaround ricci supplying a blank os; assume rhel5

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.27&r2=1.28
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/clusterOS.py.diff?cvsroot=cluster&r1=1.1&r2=1.2

--- conga/luci/site/luci/Extensions/homebase_adapters.py	2006/10/11 18:44:05	1.27
+++ conga/luci/site/luci/Extensions/homebase_adapters.py	2006/10/11 21:48:04	1.28
@@ -172,7 +172,7 @@
 
 	if rc.authed():
 		os_str = resolveOSType(rc.os())
-		if os_str == None:
+		if not os_str:
 			os_str = "rhel5"  #Backup plan in case all is almost lost...
 
 		systemName = rc.system_name()
@@ -226,7 +226,7 @@
 		cluster_info = None
 
 	os_str = resolveOSType(rc.os())
-	if os_str == None:
+	if not os_str:
 		os_str = "rhel5"  #Backup plan in case all is almost lost...
 
 	if not cluster_info or not cluster_info[0]:
--- conga/luci/site/luci/Extensions/clusterOS.py	2006/10/06 20:45:26	1.1
+++ conga/luci/site/luci/Extensions/clusterOS.py	2006/10/11 21:48:04	1.2
@@ -1,5 +1,5 @@
-def resolveOSType(os):
-	if os.find("Tikanga") != (-1) or os.find("FC6") != (-1):
-		return "rhel5"
+def resolveOSType(os_str):
+	if not os_str or os_str.find('Tikanga') != (-1) or os_str.find('FC6') != (-1):
+		return 'rhel5'
 	else:
-		return "rhel4"
+		return 'rhel4'


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