[openstack-dev] [keystone] Output on stderr
Lin Hua Cheng
os.lcheng at gmail.com
Wed Mar 4 19:50:24 UTC 2015
Here's the link to the code review: https://review.openstack.org/#/c/147399/
On Wed, Mar 4, 2015 at 7:17 AM, Dolph Mathews <dolph.mathews at gmail.com>
wrote:
>
>
> On Wednesday, March 4, 2015, David Stanek <dstanek at dstanek.com> wrote:
>
>>
>> On Wed, Mar 4, 2015 at 6:50 AM, Abhishek Talwar/HYD/TCS <
>> abhishek.talwar at tcs.com> wrote:
>>
>>> While working on a bug for keystoneclient I have replaced sys.exit with
>>> return. However, the code reviewers want that the output should be on
>>> stderr(as sys.exit does). So how can we get the output on stderr.
>>
>>
>> The print function allows you to specify a file:
>>
>> >>> from __future__ import print_function
>> >>> import sys
>> >>> print('something to', file=sys.stderr)
>>
>> The __future__ import is needed for Python 2.6/2.7 because print was
>> changed to a function in Python 3.
>>
>
> I hope that answers your question. Can we have a link to the bug and/or
> code review?
>
>
>>
>>
>> --
>> David
>> blog: http://www.traceback.org
>> twitter: http://twitter.com/dstanek
>> www: http://dstanek.com
>>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150304/059df5e7/attachment.html>
More information about the OpenStack-dev
mailing list