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))