[Linux-HA] Typo and bug in haresources2cib.py (ha 2.0.3)

Huang Zhen zhenhltc at cn.ibm.com
Mon Feb 27 17:41:34 MST 2006


The patch has been committed. Thanks!

Sam Tran wrote:
> Hi All,
> 
> I'm testing Heartbeat 2.0.3 on Debian using the Debian packages for
> Sarge. I tried haresources2cib.py to convert heartbeat 1.x haresources
> file to heartbeat 2.x cib.xml and found a typo error and a small bug.
> Here is the diff:
> 
> --- /usr/lib/heartbeat/haresources2cib.py       2006-02-14
> 05:01:06.000000000 -0500
> +++ haresources2cib.py  2006-02-27 19:00:07.000000000 -0500
> @@ -77,7 +77,7 @@
>         configuration.appendChild(crm_config)
> 
>         option_set = doc.createElement("cluster_property_set")
> -       option_set.setAttribute("id","deafult")
> +       option_set.setAttribute("id","default")
>         crm_config.appendChild(option_set)
> 
>         attr_list = doc.createElement("attributes")
> @@ -329,7 +329,7 @@
>         directive_list = []
>         for line in config :
>                 line = line.lstrip()
> -               if line[0] == "#" :
> +               if len (line) == 0 or line[0] == "#" :
>                         continue
>                 if string.split(line)[0] == directive :
>                         directive_list.append(line)
> 
> Hope this helps.
> Sam
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


-- 
Best Regards,
Huang Zhen
Linux Technology Center
IBM China Development Lab, Beijing
Telno: (8610)82782244-2845



More information about the Linux-HA mailing list