If an error occurs in nova.cmd.baseproxy the method exit_with_error
will be executed that looks as follows:
def exit_with_error(msg, errno=-1):
print(msg) and sys.exit(errno)
However, in python2.7 this method terminates the application without
printing anything(unable to flush on time) and in Python3.4 it does
strange things because print() returns None.
This commit modifies exit_with_error method to output error message
with stderr(which in unbuffered).
Reviewed: https:/ /review. openstack. org/237886 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=cf7cd655a2a aa7f44b94dca0ad 7a15073a774a48
Committed: https:/
Submitter: Jenkins
Branch: master
commit cf7cd655a2aaa7f 44b94dca0ad7a15 073a774a48
Author: Wen Zhi Yu <email address hidden>
Date: Wed Oct 21 13:38:22 2015 +0800
Fix error handling in nova.cmd.baseproxy
If an error occurs in nova.cmd.baseproxy the method exit_with_error
will be executed that looks as follows:
def exit_with_ error(msg, errno=-1):
print(msg) and sys.exit(errno)
However, in python2.7 this method terminates the application without
printing anything(unable to flush on time) and in Python3.4 it does
strange things because print() returns None.
This commit modifies exit_with_error method to output error message
with stderr(which in unbuffered).
Change-Id: I519b68f8c2bc62 988de87bdd2847d 5f3be7e532d
Closes-Bug: #1506213