if len(self.mods) != len(self.moddirs): warning = wx.MessageDialog(self, 'a', 'Warning', wx.OK | wx.ICON_WARNING) warning.ShowModal() warning.Destroy()