fix some crashes during settings wizard
[enigma2.git] / lib / python / Plugins / SystemPlugins / Videomode / VideoHardware.py
index adc63d2c404c8e1bb07fa86e129359054a8caddc..6ecbfd49cd37081dbce722d24d9112d3805c580c 100644 (file)
@@ -196,10 +196,12 @@ class VideoHardware:
                print "saveMode", port, mode, rate
                config.av.videoport.value = port
                config.av.videoport.save()
-               config.av.videomode[port].value = mode
-               config.av.videomode[port].save()
-               config.av.videorate[mode].value = rate
-               config.av.videorate[mode].save()
+               if port in config.av.videomode:
+                       config.av.videomode[port].value = mode
+                       config.av.videomode[port].save()
+               if mode in config.av.videorate:
+                       config.av.videorate[mode].value = rate
+                       config.av.videorate[mode].save()
 
        def isPortAvailable(self, port):
                # fixme
@@ -239,8 +241,10 @@ class VideoHardware:
                portlist = self.getPortList()
                for port in portlist:
                        descr = port
-                       if descr == 'DVI' and hw_type == 'dm500hd':
+                       if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se', 'dm7020hd'):
                                descr = 'HDMI'
+                       elif descr == 'DVI-PC' and hw_type in ('dm500hd', 'dm800se', 'dm7020hd'):
+                               descr = 'HDMI-PC'
                        lst.append((port, descr))
 
                        # create list of available modes