Hi Dejan

Thanks.
I can confirm the bug is fixed.


Regards,
Takatoshi MATSUO


2013/6/27 Dejan Muhamedagic <[email protected]>:
> Hi Takatoshi-san,
>
> On Thu, Jun 27, 2013 at 02:43:15PM +0900, Takatoshi MATSUO wrote:
>> Hi Dejan
>>
>> Thanks.
>> But previous commit c8e7cb61 or 7c9df6e81 (Jun 21) cause this error
>> when using comment between configuration.
>
> Oops. Good catch. Fixed now. Thanks for reporting!
>
> Cheers,
>
> Dejan
>
>> config.crm
>> ------------------------
>> property \
>>      no-quorum-policy="ignore" \
>>      stonith-enabled="false" \
>>      startup-fencing="false" \
>>      stonith-timeout="20s"
>>
>> # comment
>> primitive dummy ocf:heartbeat:Dummy
>> --------------
>>
>> # crm configure load update config.crm
>> Traceback (most recent call last):
>>   File "/usr/sbin/crm", line 44, in <module>
>>     main.run()
>>   File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 414, in run
>>     do_work()
>>   File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 323, in 
>> do_work
>>     if parse_line(levels, shlex.split(' '.join(l))):
>>   File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 149,
>> in parse_line
>>     rv = d() # execute the command
>>   File "/usr/lib64/python2.6/site-packages/crmsh/main.py", line 148, in 
>> <lambda>
>>     d = lambda: cmd[0](*args)
>>   File "/usr/lib64/python2.6/site-packages/crmsh/ui.py", line 1694, in load
>>     return set_obj.import_file(method, url)
>>   File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line
>> 268, in import_file
>>     return self.save(s, method == "update")
>>   File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line
>> 455, in save
>>     if self.process(cli_list, update) == False:
>>   File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line
>> 409, in process
>>     obj = cib_factory.create_from_cli(cli_list)
>>   File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line
>> 2615, in create_from_cli
>>     node = obj.cli2node(cli_list)
>>   File "/usr/lib64/python2.6/site-packages/crmsh/cibconfig.py", line
>> 918, in cli2node
>>     stuff_comments(node, comments)
>>   File "/usr/lib64/python2.6/site-packages/crmsh/xmlutil.py", line
>> 506, in stuff_comments
>>     add_comment(node, s)
>>   File "/usr/lib64/python2.6/site-packages/crmsh/xmlutil.py", line
>> 503, in add_comment
>>     e.insert(firstelem, comm_elem)
>>   File "lxml.etree.pyx", line 723, in lxml.etree._Element.insert
>> (src/lxml/lxml.etree.c:32132)
>> TypeError: 'NoneType' object cannot be interpreted as an index
>>
>>
>>
>> Commit ff28b19b doesn't issue this error.
>>
>> Regards,
>> Takatoshi MATSUO
>>
>> 2013/6/26 Dejan Muhamedagic <[email protected]>:
>> > Hi Takatoshi-san,
>> >
>> > On Wed, Jun 26, 2013 at 11:48:00AM +0900, Takatoshi MATSUO wrote:
>> >> Hi Dejan
>> >>
>> >> I received another FutureWarning of python.
>> >>
>> >> /usr/lib64/python2.6/site-packages/crmsh/completion.py:88:
>> >> FutureWarning: The behavior of this
>> >> method will change in future versions. Use specific 'len(elem)' or
>> >> 'elem is not None' test instead.
>> >>   if not doc
>> >
>> > Fixed now. Thanks!
>> >
>> > Dejan
>> >
>> >> Regards,
>> >> Takatoshi MATSUO
>> >>
>> >> 2013/6/21 Takatoshi MATSUO <[email protected]>:
>> >> > Hi Dejan
>> >> >
>> >> > Thank you for your quick response.
>> >> > I can inhibit warnings.
>> >> >
>> >> > Regards,
>> >> > Takatoshi MATSUO
>> >> >
>> >> >
>> >> > 2013/6/21 Dejan Muhamedagic <[email protected]>:
>> >> >> Hi Takatoshi-san,
>> >> >>
>> >> >> On Fri, Jun 21, 2013 at 04:41:39PM +0900, Takatoshi MATSUO wrote:
>> >> >>> Hi Dejan
>> >> >>>
>> >> >>> I use latest crmsh(ff28b19bdb1d) and it issues FutureWarning of python
>> >> >>> when using comment(#).
>> >> >>>
>> >> >>> config.crm file
>> >> >>> --------------------
>> >> >>> # Comment
>> >> >>> property \
>> >> >>>     no-quorum-policy="ignore" \
>> >> >>>     stonith-enabled="false" \
>> >> >>>     startup-fencing="false" \
>> >> >>>     stonith-timeout="20s"
>> >> >>> --------------------
>> >> >>>
>> >> >>> -------
>> >> >>> # crm configure load update config.crm
>> >> >>> /usr/lib64/python2.7/site-packages/crmsh/cibconfig.py:917:
>> >> >>> FutureWarning: The behavior of this method will change in future
>> >> >>> versions. Use specific 'len(elem)' or 'elem is not None' test instead.
>> >> >>>   if comments and node:
>> >> >>
>> >> >> Fixed now. And some more. Hope there won't be any more in Future.
>> >> >>
>> >> >> Cheers,
>> >> >>
>> >> >> Dejan
>> >> >>
>> >> >>> -------
>> >> >>>
>> >> >>> I use python 2.7.3 on Fedora 18.
>> >> >>> Python 2.6.6 issues same warning on RHEL6.
>> >> >>>
>> >> >>> Thanks,
>> >> >>> Takatoshi MATSUO
>> >> >>> _______________________________________________________
>> >> >>> Linux-HA-Dev: [email protected]
>> >> >>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> >> >>> Home Page: http://linux-ha.org/
>> >> >> _______________________________________________________
>> >> >> Linux-HA-Dev: [email protected]
>> >> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> >> >> Home Page: http://linux-ha.org/
>> >> _______________________________________________________
>> >> Linux-HA-Dev: [email protected]
>> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> >> Home Page: http://linux-ha.org/
>> > _______________________________________________________
>> > Linux-HA-Dev: [email protected]
>> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> > Home Page: http://linux-ha.org/
>> _______________________________________________________
>> Linux-HA-Dev: [email protected]
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to