[Freeipa-devel] [PATCH] 0256 Fix installutils.get_password without a TTY

Martin Kosek mkosek at redhat.com
Tue Aug 6 08:35:08 UTC 2013


On 07/30/2013 06:05 PM, Nathaniel McCallum wrote:
> On Tue, 2013-07-30 at 18:01 +0200, Petr Viktorin wrote:
>> On 07/30/2013 05:23 PM, Ana Krivokapic wrote:> On 07/30/2013 01:15 PM, > 
>> There's a typo in the commit message: "ises" instead of "uses".
>>
>> Fixed.
>>
>>
>> On 07/30/2013 05:43 PM, Nathaniel McCallum wrote:
>>> On Tue, 2013-07-30 at 17:36 +0200, Petr Viktorin wrote:
>>>> On 07/30/2013 05:20 PM, Nathaniel McCallum wrote:
>>>>> On Tue, 2013-07-30 at 13:15 +0200, Petr Viktorin wrote:
>>>>>> See the commit message or ticket.
>>>>>>
>>>>>> This is a nuisance when writing tests for interactive prompting.
>>>>>>
>>>>>> https://fedorahosted.org/freeipa/ticket/3824
>>>>>
>>>>> There appears to be a stray comma.
>>>>
>>>> The comma at the end of a print statement suppresses the trailing newline.
>>>
>>> Wouldn't sys.stdout.write() be clearer?
>>
>> I don't have a preference. Changed.
>>
>>> The comma approach also doesn't work in py3k.
>>
>> Well, the print statement itself doesn't work in py3k :)
>>
>> The 2to3 tool handles the trailing comma without problems (and we'll 
>> probably use the print fixer when porting).
>>
>> $ 2to3 --fix print /tmp/printtest.py
>> RefactoringTool: Refactored /tmp/printtest.py
>> --- /tmp/printtest.py   (original)
>> +++ /tmp/printtest.py   (refactored)
>> @@ -1 +1 @@
>> -print 'foo',
>> +print('foo', end=' ')
>> RefactoringTool: Files that need to be modified:
>> RefactoringTool: /tmp/printtest.py
>>
> 
> +1

ACK for Petr's patch. Pushed to master.

Martin




More information about the Freeipa-devel mailing list