make code more readable
authorChristian Weiske <cweiske@cweiske.de>
Wed, 23 Nov 2011 05:41:52 +0000 (06:41 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 23 Nov 2011 05:41:52 +0000 (06:41 +0100)
src/CurlyTxSettings.py

index 686212c..587f03d 100644 (file)
@@ -90,7 +90,8 @@ class CurlyTxSettings(ConfigListScreen, HelpableScreen, Screen):
         ConfigListScreen.keyRight(self)
 
     def deletePage(self):
-        if len(config.plugins.CurlyTx.pages) == 0 or self["config"].getCurrentIndex() >= len(config.plugins.CurlyTx.pages):
+        pageCount = len(config.plugins.CurlyTx.pages)
+        if pageCount == 0 or self["config"].getCurrentIndex() >= pageCount:
             return
 
         from Screens.MessageBox import MessageBox