etherlab/EthercatMaster.py
changeset 2367 0fb54172a18b
parent 2366 d635680e4c2c
child 2370 e40f3914e55f
equal deleted inserted replaced
2366:d635680e4c2c 2367:0fb54172a18b
   442         execute = True
   442         execute = True
   443         if len(self.Children) > 0:
   443         if len(self.Children) > 0:
   444             dialog = wx.MessageDialog(app_frame,
   444             dialog = wx.MessageDialog(app_frame,
   445                 _("The current network configuration will be deleted.\nDo you want to continue?"),
   445                 _("The current network configuration will be deleted.\nDo you want to continue?"),
   446                 _("Scan Network"),
   446                 _("Scan Network"),
   447                 wx.YES_NO|wx.ICON_QUESTION)
   447                 wx.YES_NO | wx.ICON_QUESTION)
   448             execute = dialog.ShowModal() == wx.ID_YES
   448             execute = dialog.ShowModal() == wx.ID_YES
   449             dialog.Destroy()
   449             dialog.Destroy()
   450 
   450 
   451         if execute:
   451         if execute:
   452             error, returnVal = self.RemoteExec(SCAN_COMMAND, returnVal=None)
   452             error, returnVal = self.RemoteExec(SCAN_COMMAND, returnVal=None)
   453             if error != 0:
   453             if error != 0:
   454                 dialog = wx.MessageDialog(app_frame, returnVal, "Error", wx.OK|wx.ICON_ERROR)
   454                 dialog = wx.MessageDialog(app_frame, returnVal, "Error", wx.OK | wx.ICON_ERROR)
   455                 dialog.ShowModal()
   455                 dialog.ShowModal()
   456                 dialog.Destroy()
   456                 dialog.Destroy()
   457             elif returnVal is not None:
   457             elif returnVal is not None:
   458                 for child in self.IECSortedChildren():
   458                 for child in self.IECSortedChildren():
   459                     self._doRemoveChild(child)
   459                     self._doRemoveChild(child)