do not delete page when no pages are defined
authorChristian Weiske <cweiske@cweiske.de>
Thu, 17 Nov 2011 22:03:00 +0000 (23:03 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 17 Nov 2011 22:03:00 +0000 (23:03 +0100)
src/CurlyTxSettings.py

index 87aeb62..71940e3 100644 (file)
@@ -64,6 +64,9 @@ class CurlyTxSettings(ConfigListScreen, Screen):
         ConfigListScreen.keyRight(self)
 
     def deletePage(self):
+        if len(config.plugins.CurlyTx.pages) == 0:
+            return
+
         from Screens.MessageBox import MessageBox
         self.session.openWithCallback(
             self.deletePageConfirm,