[augeas-devel] debugging "IOError when saving file"
Michael
info at fonfon.at
Wed Aug 20 14:38:40 UTC 2014
Hi,
I just added a lens for pagekite:
https://github.com/hercules-team/augeas/pull/153
The tests and basic usage works, I use the lens via the python bindings.
But for two config files (80_httpd.rc and 80_sshd.rc), editing or
deleting existing entries fails with "IOError: Unable to save to
file!"*. Inserting new entries works though.
I failed to get more debugging info following these advices:
https://github.com/hercules-team/augeas/wiki/Debugging-tips#Runtime_debugging
How can I find out why saving doesn't work? All config files have the
same permissions.
Thanks,
Michael
* Here's how I use the lenses to edit entries:
>>> aug = augeas.Augeas()
>>> path = '/files/etc/pagekite.d/80_httpd.rc/service_on/1/source'
>>> aug.get(path)
'http:@kitename'
>>> aug.set(path, 'wontwork')
>>> aug.save()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/augeas.py", line 385, in save
raise IOError("Unable to save to file!")
IOError: Unable to save to file!
Removing entries looks like:
>>> aug.match('/files/etc/pagekite.d/80_httpd.rc/service_on/1')
['/files/etc/pagekite.d/80_httpd.rc/service_on/1']
>>> aug.remove(path)
4
>>> aug.save()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/augeas.py", line 385, in save
raise IOError("Unable to save to file!")
IOError: Unable to save to file!
More information about the augeas-devel
mailing list