[master/jenkins-fix][PATCH] Make pylint happy about the idx variable
David Shea
dshea at redhat.com
Mon Apr 14 15:34:01 UTC 2014
On 04/14/2014 11:12 AM, Vratislav Podzimek wrote:
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
> pyanaconda/ui/gui/spokes/custom.py | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
> index 65e36a2..644e51c 100644
> --- a/pyanaconda/ui/gui/spokes/custom.py
> +++ b/pyanaconda/ui/gui/spokes/custom.py
> @@ -1947,6 +1947,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
> found = None
>
> # TODO: implement and use function for finding item in combobox
> + idx = None
> for idx, data in enumerate(self._containerStore):
> # we're looking for the original vg name
> if data[0] == container_name:
> @@ -1956,6 +1957,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
> self._update_selectors()
> return
>
> + if not idx:
> + # nothing in the store, just update selectors and return
> + self._update_selectors()
> + return
> +
> c = self._storage_playground.devicetree.getDeviceByName(self._device_container_name)
> freeSpace = getattr(c, "freeSpace", None)
>
Whoops, I already pushed a disable pragma for this. This patch is fine,
but you can dump the else: branch of the for loop if using this.
More information about the anaconda-patches
mailing list