[Piuparts-devel] Chroot.create_apt_conf

Herbert Fortes terberh at gmail.com
Thu Feb 21 12:06:13 GMT 2019


On 2/20/19 10:52 AM, Herbert Fortes wrote:
> On 2/19/19 4:55 PM, Holger Levsen wrote:
>> Hi,
>>
>> On Mon, Feb 18, 2019 at 03:46:36PM -0300, Herbert Fortes wrote:
>>> re.search can do the task that re.compile, for-loop, .split('\n') and
>>> re.match do simpliest. And it stops at first match.
>>> http://paste.debian.net/1068761/
>>
>> doesn't that still need an 'if stdout:' block?
> 
> stdout as 'None' in re.search really is a problem. But I tried
> to have a stdout as 'None' without sucess.
> 
> I did this just now:
> 
>>>> import re
>>>> stdout = None
>>>> re.search('bla', str(stdout), flags=re.I)
>>>> stdout = 'bla'
>>>> re.search('bla', str(stdout), flags=re.I)
> <_sre.SRE_Match object at 0x7fa9ea6b5440>
>>>>
> 
> Can use 'str()' to be 100% sure.
> 
>>

I edited only the necessary lines. Here is the new patch:

https://github.com/hpfn-d/piuparts_3/commit/43b5f91820dcb0c328c986383a7f799b516cabc8



More information about the Piuparts-devel mailing list