[PATCH 13/14] Prevent tracebacks caused by gi.overrides bug

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

 



---
 pyanaconda/ui/gui/spokes/datetime_spoke.py |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 0f45806..acbaa9e 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -121,14 +121,22 @@ class DatetimeSpoke(NormalSpoke):
         store.append([item])
 
     def existing_date(self, model, itr, user_data=None):
-        day = model[itr][0]
-        months_model = self._monthCombo.get_model()
-        months_iter = self._monthCombo.get_active_iter()
-        month = months_model[months_iter][0]
-
-        years_model = self._yearCombo.get_model()
-        years_iter = self._yearCombo.get_active_iter()
-        year = years_model[years_iter][0]
+        day = 0
+        month = ""
+        year = 0
+
+        try:
+            day = model[itr][0]
+            months_model = self._monthCombo.get_model()
+            months_iter = self._monthCombo.get_active_iter()
+            month = months_model[months_iter][0]
+
+            years_model = self._yearCombo.get_model()
+            years_iter = self._yearCombo.get_active_iter()
+            year = years_model[years_iter][0]
+        except TypeError as typerr:
+            #FIXME:otherwise bug in gi.overrides causes tracebacks here
+            pass
 
         try:
             if not month:
-- 
1.7.4.4

_______________________________________________
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