Comment 4 for bug 1506213

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/237886
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=cf7cd655a2aaa7f44b94dca0ad7a15073a774a48
Submitter: Jenkins
Branch: master

commit cf7cd655a2aaa7f44b94dca0ad7a15073a774a48
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: I519b68f8c2bc62988de87bdd2847d5f3be7e532d
    Closes-Bug: #1506213