Merge commit 'origin/bug_178_update_meta_files' into experimental
[enigma2.git] / lib / python / Plugins / SystemPlugins / NFIFlash / downloader.py
index ba668f8b55fbde836a6d56aadb60e0be69cb9924..6463f179f3db45f8e20c6a3c8310e65b5585ff72 100644 (file)
@@ -54,7 +54,7 @@ class Feedlist(MenuList):
 
        def isValid(self):
                l = self.l.getCurrentSelection()
-               if l[0] == 0:
+               if not l or l[0] == 0:
                        return False
                else:
                        return True
@@ -653,11 +653,11 @@ class NFIDownload(Screen):
                self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the wizard."), type = MessageBox.TYPE_INFO)
 
        def closeCB(self):
-               if self.download:
+               try:
                        self.download.stop()
                        #self.nfi_failed(None, "Cancelled by user request")
                        self.downloading(False)
-               else:
+               except AttributeError:
                        self.close()
 
 def main(session, **kwargs):