Hide Forgot
Description of problem: The return value from `set' method is discarded Version-Release number of selected component (if applicable): Any version, upstream version doesn't have it neither How reproducible: 100% Steps to Reproduce: ]# python Python 2.7.1 (r271:86832, Apr 12 2011, 16:15:16) [GCC 4.6.0 20110331 (Red Hat 4.6.0-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import augeas >>> aug=augeas.Augeas() >>> aug.set("/files/etc/foo", "bar") >>> print aug.set("/files/etc/foo", "bar") None >>> aug.get("/files/etc/foo") 'bar' >>>
I don't think that this is a bug. The return value of aug_set() is only used to indicate if an error occurred (-1) or not (0). The Python interface maps this to raising an exception in the error case. Contrasting, aug_setm() returns the number of modified nodes, which is returned by the Python setm() method, but nevertheless an exception is raise in the event of an error (instead of returning -1). Harald, Greg?
Ah, you're right. Maybe this can be closed. Exception would be enough.