[blivet:master 1/3] Suppress some unused variable warnings
Chris Lumens
clumens at redhat.com
Mon Mar 24 17:51:54 UTC 2014
> 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
More information about the anaconda-patches
mailing list