Bug 717677
Summary: | Allow to call set() method with None value | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Roman Rakus <rrakus> | ||||||
Component: | python-augeas | Assignee: | Harald Hoyer <harald> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | rawhide | CC: | harald, tsmetana | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | python-augeas-0.4.1-1.fc16 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2012-02-22 01:57:51 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Created attachment 510480 [details]
Allows None value in set() method
Promised patch.
Created attachment 510688 [details] proposed patch for upstream git patch for http://git.fedorahosted.org/git/?p=python-augeas.git Would that work? Yep it works. Thanks. python-augeas-0.4.1-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/python-augeas-0.4.1-1.fc16 Package python-augeas-0.4.1-1.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-augeas-0.4.1-1.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-0771/python-augeas-0.4.1-1.fc16 then log in and leave karma (feedback). python-augeas-0.4.1-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: It's not possible to set None (NULL in C) value in method set(). From the API doc: If no node exists for PATH, one is created, including intermediate nodes, and its value is set to VALUE, which may be NULL. Version-Release number of selected component (if applicable): all How reproducible: always Steps to Reproduce: # python Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from augeas import Augeas >>> a=Augeas() >>> a.set("/files/etc/kdump.conf/options/module1/new", "val") >>> a.save() >>> a.set("/files/etc/kdump.conf/options/module1/new", None) Actual results: Traceback Expected results: Creates the nodes and set value to NULL. Additional info: Will attach a patch