I'm embarrassed to say that, while I have made heavy use of this plugin that I submitted last year, I only now have gotten around to fixing this silly mistake of mine. The plugin does not recognize errors returned by nsupdate, because it isn't properly capturing stderr. This patch fixes it.
The nsupdate plugin calls the same-named binary using the subprocess.Popen class, which by default, does NOT capture stderr output. Because of this, errors occurring during calls to nsupdate are not properly reflected by ddupdate.
Set stderr=PIPE, and then check for any stderr output. In the event of any such output, print the error output, and return failure.
I'm embarrassed to say that, while I have made heavy use of this plugin that I submitted last year, I only now have gotten around to fixing this silly mistake of mine. The plugin does not recognize errors returned by
nsupdate
, because it isn't properly capturing stderr. This patch fixes it.The nsupdate plugin calls the same-named binary using the subprocess.Popen class, which by default, does NOT capture stderr output. Because of this, errors occurring during calls to nsupdate are not properly reflected by ddupdate.
Set
stderr=PIPE
, and then check for any stderr output. In the event of any such output, print the error output, and return failure.