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

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

 



---
 pyanaconda/ui/gui/hubs/progress.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

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
+        else:
+            self._rnotesImage.set_from_file(nxt)
         return True
 
     def initialize(self):
-- 
1.7.7.6

_______________________________________________
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