[blivet:master 1/2] Match whole string, not substring.
Vratislav Podzimek
vpodzime at redhat.com
Wed Nov 19 07:21:45 UTC 2014
On Tue, 2014-11-18 at 18:09 -0500, mulhern wrote:
> The expression on the right of the 'in' was being interpreted as a str
> with some pointless parens around it. Now it is interpreted as a tuple.
>
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
> blivet/arch.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blivet/arch.py b/blivet/arch.py
> index 810ec1c..cd93d86 100644
> --- a/blivet/arch.py
> +++ b/blivet/arch.py
> @@ -285,7 +285,7 @@ def isPPC(bits=None):
> if arch in ('ppc', 'ppc64', 'ppc64le'):
> return True
> elif bits == 32:
> - if arch in ('ppc'):
> + if arch in ('ppc',):
Wouldn't it be better to use 'if arch == 'ppc':' here instead? I know
the usage of 'in' is a common pattern in that code, but it just looks
weird to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list