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

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



---
 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


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