Re: [PATCH 6/6] Don't crash when there are no rnotes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py
> index 85eca33..f2ae97b 100644
> --- a/pyanaconda/ui/gui/hubs/progress.py
> +++ b/pyanaconda/ui/gui/hubs/progress.py
> @@ -108,8 +108,13 @@ class ProgressHub(Hub):
>          # Change the ransom notes image every minute by grabbing the next
>          # image's filename.  Note that self._rnotes is an infinite list, so
>          # this will cycle through the images indefinitely.
> -        nxt = self._rnotes.next()
> -        self._rnotesImage.set_from_file(nxt)
> +        try:
> +            nxt = self._rnotes.next()
> +        except StopIteration:
> +            # there are no rnotes
> +            pass

If you return False here, then we won't try to cycle rnotes any more.
Though, then there'll have to be some sort of guard around the
source_remove call in _update_progress.  Seems a toss up as to which way
it should work.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux