Author: duncan
Date: Wed Nov 14 14:50:38 2007
New Revision: 10115

Log:
Woarkaround for a crashing bug when there are no menu items left


Modified:
   branches/rel-1-7/freevo/src/menu.py
   branches/rel-1/freevo/src/menu.py

Modified: branches/rel-1-7/freevo/src/menu.py
==============================================================================
--- branches/rel-1-7/freevo/src/menu.py (original)
+++ branches/rel-1-7/freevo/src/menu.py Wed Nov 14 14:50:38 2007
@@ -803,7 +803,10 @@
 
         # recalc everything!
         current = menu.selected
-        pos = menu.choices.index(current)
+        try:
+            pos = menu.choices.index(current)
+        except ValueError, e:
+            print 'menu.choices.index(current) failed: %s' % (e)
 
         menu.previous_page_start = []
         menu.previous_page_start.append(0)

Modified: branches/rel-1/freevo/src/menu.py
==============================================================================
--- branches/rel-1/freevo/src/menu.py   (original)
+++ branches/rel-1/freevo/src/menu.py   Wed Nov 14 14:50:38 2007
@@ -803,7 +803,10 @@
 
         # recalc everything!
         current = menu.selected
-        pos = menu.choices.index(current)
+        try:
+            pos = menu.choices.index(current)
+        except ValueError, e:
+            print 'menu.choices.index(current) failed: %s' % (e)
 
         menu.previous_page_start = []
         menu.previous_page_start.append(0)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to