X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee707cb73a4d69d45181e29d94095bbeb3340018..a92b0cfd2bd0bef75b43c071df0b0e028f360d8e:/wxPython/demo/wxMimeTypesManager.py diff --git a/wxPython/demo/wxMimeTypesManager.py b/wxPython/demo/wxMimeTypesManager.py index 9a9c8d8ece..7c9a03a2c1 100644 --- a/wxPython/demo/wxMimeTypesManager.py +++ b/wxPython/demo/wxMimeTypesManager.py @@ -75,7 +75,13 @@ class MimeTypesTestPanel(wxPanel): self.GetExtensionsTxt().SetValue(str(ft.GetExtensions())) self.GetDescriptionTxt().SetValue(str(ft.GetDescription())) - filename = os.path.join("SPAM", ft.GetExtensions()[0]) + 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) self.GetOpenCmdTxt().SetValue(str(cmd))