[Freeipa-devel] [PATCH 0018] Fixed install_ca and install_kra failures at domain level 0
Oleg Fayans
ofayans at redhat.com
Mon Dec 14 13:08:35 UTC 2015
Hi Martin,
On 12/11/2015 05:58 PM, Martin Basti wrote:
>
>
> On 11.12.2015 17:28, Oleg Fayans wrote:
>> + myre = re.compile(".*Backed up to (?P<backup>.*?)\n.*")
>
> IMO this regexp is not good.
>
> 1)
> please name it better than "myre"
Done
>
> 2)
> initial '.*' is not needed because regexp does not start with '^' and
> you use search() later
>
> 3)
>
> trailing '.*' is not needed as well, because it does not end with '$'
>
> 4)
> You can use re.MULTILINE that will parse string per lines
>
> path_re = re.compile("^Backed up to (?P<backup>.*)$", re.MULTILINE)
Used it, thanks!
>
> 5)
> + matched = myre.search(result.stdout_text + result.stderr_text)
> Why do you need search in both stderr and stdout?
Because of this bug: https://fedorahosted.org/freeipa/ticket/5484
>
> Martin^2
>
>
--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-ofayans-0018.1-Fixed-install_ca-and-install_kra-domainlevel-0.patch
Type: text/x-patch
Size: 2604 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151214/b67daefa/attachment.bin>
More information about the Freeipa-devel
mailing list