Salome HOME
prevent from double session close
[modules/kernel.git] / bin / addToKillList.py
index 7d688aca2d579a6ab7665b3c90102736895d0f75..0282f10520ead456b4c0b090d697b0913d82f862 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -22,7 +22,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-import os, sys, pickle, string, signal
+import os, sys, pickle, signal
 from launchConfigureParser import verbose
 
 ########## adds to the kill list of SALOME one more process ##########
@@ -60,7 +60,7 @@ def addToKillList(command_pid, command, port=None):
     # check if PID is already in dictionary
     already_in=False
     for process_id in process_ids:
-        for pid, cmd in process_id.items():
+        for pid in process_id.keys():
             if int(pid) == int(command_pid):
                 already_in=True
                 break