Avoid crash in servicescan on boxes without LCD device
authorMirakels <mirakels@openpli.org>
Fri, 18 Dec 2015 09:44:01 +0000 (10:44 +0100)
committerMirakels <mirakels@openpli.org>
Fri, 18 Dec 2015 09:45:05 +0000 (10:45 +0100)
lib/python/Components/ServiceScan.py

index a32e7a5..40dfaaa 100644 (file)
@@ -19,7 +19,7 @@ class ServiceScan:
        def scanStatusChanged(self):
                if self.state == self.Running:
                        self.progressbar.setValue(self.scan.getProgress())
-                       self.lcd_summary.updateProgress(self.scan.getProgress())
+                       self.lcd_summary and self.lcd_summary.updateProgress(self.scan.getProgress())
                        if self.scan.isDone():
                                errcode = self.scan.getError()
 
@@ -191,7 +191,7 @@ class ServiceScan:
                newServiceName = self.scan.getLastServiceName()
                newServiceRef = self.scan.getLastServiceRef()
                self.servicelist.addItem((newServiceName, newServiceRef))
-               self.lcd_summary.updateService(newServiceName)
+               self.lcd_summary and self.lcd_summary.updateService(newServiceName)
 
        def destroy(self):
                pass