[Piuparts-devel] Chroot.create_apt_conf

Herbert Fortes terberh at gmail.com
Wed Feb 20 13:52:12 GMT 2019


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.

> 
> also, please send patches via git, not paste.debian.net :)

OK! 


I did a patch putting all if-elif-else to get a proxy value
in a staticmethod. And did some tests. I can do a patch with
only subprocess stuff.



More information about the Piuparts-devel mailing list