----- Original Message -----
From: "Chris Lumens" <clumens(a)redhat.com>
To: anaconda-patches(a)lists.fedorahosted.org
Sent: Monday, March 24, 2014 1:51:54 PM
Subject: Re: [blivet:master 1/3] Suppress some unused variable warnings
> diff --git a/blivet/fcoe.py b/blivet/fcoe.py
> index aa4618f..8ab0a0d 100644
> --- a/blivet/fcoe.py
> +++ b/blivet/fcoe.py
> @@ -77,7 +77,7 @@ class fcoe(object):
> log.info("No FCoE EDD info found: %s", rc.rstrip())
> return
>
> - (key, val) = rc.strip().split("=", 1)
> + (_key, val) = rc.strip().split("=", 1)
> #if val not in isys.getDeviceProperties():
> # log.error("Unknown FCoE NIC found in EDD: %s, ignoring",
val)
> # return
Another option you could consider for cases like this is:
val = rc.strip().split("=", 1)[1]
It's probably not clearer, but it might be nicer to do in some places
where we really just don't care at all about one of the values. I have
no strong preference one way or another, though.
- Chris
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Thanks, this one edit I'm taking out of the patch,
because it should use partition, not split, and it should check
for errors, i.e., it doesn't just need supressing it needs a bit of fixing.
Generally, I like unpacking instead of indexing, because the name can indicate what
the developer expects.
- mulhern