zmirror: Fix use of print rather than logging.foo in send_zephyr.

(imported from commit 7188f5364a864f2f144fb630d7a8c85d69219c42)
This commit is contained in:
Tim Abbott 2013-01-02 13:37:20 -05:00
parent 44c5315cd7
commit 1e91142e38

View file

@ -423,15 +423,15 @@ def send_zephyr(zwrite_args, content):
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate(input=content.encode("utf-8"))
if p.returncode:
print "zwrite command '%s' failed with return code %d:" % (
" ".join(zwrite_args), p.returncode,)
logging.error("zwrite command '%s' failed with return code %d:" % (
" ".join(zwrite_args), p.returncode,))
if stdout:
print stdout
logging.info("stdout: " + stdout)
elif stderr:
print "zwrite command '%s' printed the following warning:" % (
" ".join(zwrite_args),)
logging.warning("zwrite command '%s' printed the following warning:" % (
" ".join(zwrite_args),))
if stderr:
print stderr
logging.warning("stderr: " + stderr)
return (p.returncode, stderr)
def send_authed_zephyr(zwrite_args, content):