]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed a little demo problem
authorRobin Dunn <robin@alldunn.com>
Tue, 13 Nov 2001 00:32:39 +0000 (00:32 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 13 Nov 2001 00:32:39 +0000 (00:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/wxMimeTypesManager.py

index 4a830181b61f853a2c515fb2325d1c94efca90f7..7c9a03a2c1668118f030a1232881bbc6f855425a 100644 (file)
@@ -75,8 +75,12 @@ class MimeTypesTestPanel(wxPanel):
         self.GetExtensionsTxt().SetValue(str(ft.GetExtensions()))
         self.GetDescriptionTxt().SetValue(str(ft.GetDescription()))
 
         self.GetExtensionsTxt().SetValue(str(ft.GetExtensions()))
         self.GetDescriptionTxt().SetValue(str(ft.GetDescription()))
 
-        ext = ft.GetExtensions()[0]
-        if ext[0] == ".": ext = ext[1:]
+        extList = ft.GetExtensions()
+        if extList:
+            ext = extList[0]
+            if ext[0] == ".": ext = ext[1:]
+        else:
+            ext = ""
         filename = "SPAM" + "." + ext
         mime = ft.GetMimeType() or ""
         cmd = ft.GetOpenCommand(filename, mime)
         filename = "SPAM" + "." + ext
         mime = ft.GetMimeType() or ""
         cmd = ft.GetOpenCommand(filename, mime)