|
@@ -218,7 +218,12 @@ class RLiSetupFrame(wx.Frame):
|
|
|
|
|
|
def OnRemove(self, event):
|
|
|
"""Remove configuration file from path and update the list"""
|
|
|
- confile = self.listfiles[self.listfileBox.GetSelections()[0]]
|
|
|
+ try:
|
|
|
+ confile = self.listfiles[self.listfileBox.GetSelections()[0]]
|
|
|
+ except IndexError:
|
|
|
+ gcmd.GMessage(parent=self,
|
|
|
+ message=_("You have to select a configuration file"))
|
|
|
+ return
|
|
|
dlg = wx.MessageDialog(
|
|
|
parent=self.parent,
|
|
|
message=_(
|
|
@@ -246,7 +251,7 @@ class RLiSetupFrame(wx.Frame):
|
|
|
"""Rename an existing configuration file"""
|
|
|
try:
|
|
|
confile = self.listfiles[self.listfileBox.GetSelections()[0]]
|
|
|
- except:
|
|
|
+ except IndexError:
|
|
|
gcmd.GMessage(parent=self,
|
|
|
message=_("You have to select a configuration file"))
|
|
|
return
|
|
@@ -266,7 +271,7 @@ class RLiSetupFrame(wx.Frame):
|
|
|
"""Show and edit a configuration file"""
|
|
|
try:
|
|
|
confile = self.listfiles[self.listfileBox.GetSelections()[0]]
|
|
|
- except:
|
|
|
+ except IndexError:
|
|
|
gcmd.GMessage(parent=self,
|
|
|
message=_("You have to select a configuration file"))
|
|
|
return
|