# HG changeset patch # User ed # Date 1260111513 -3600 # Node ID e01434cfcb9db81274b8c39a82913b6495301d10 # Parent dbcf4a13926d69e882a229572959132e5aed0d2d Fixes diff -r dbcf4a13926d -r e01434cfcb9d plugger.py --- a/plugger.py Sun Dec 06 15:56:44 2009 +0100 +++ b/plugger.py Sun Dec 06 15:58:33 2009 +0100 @@ -1609,9 +1609,10 @@ for IECPathToPop in IECPathsToPop: self.IECdebug_datas.pop(IECPathToPop) - Idxs.sort() - self.TracedIECPath = zip(Idxs)[2] - self._connector.SetTraceVariablesList(zip(zip(Idxs)[0:1])) + if Idxs: + Idxs.sort() + self.TracedIECPath = zip(Idxs)[2] + self._connector.SetTraceVariablesList(zip(zip(Idxs)[0:1])) self.IECdebug_lock.release() #for IEC_path, IECdebug_data in self.IECdebug_datas.iteritems(): @@ -1761,7 +1762,7 @@ self.logger.write(_("Stopping debug\n")) self.KillDebugThread() - if not self._connector.StopPLC(): + if self._connector is not None and not self._connector.StopPLC(): self.logger.write_error(_("Couldn't stop PLC !\n")) self.UpdateMethodsFromPLCStatus()