#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2016 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
# 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 ##########
# retrieve current processes dictionary
from killSalomeWithPort import getPiDict
if port is None: port=findFileDict()
- try:
- import PortManager
- filedict = getPiDict(port, hidden=True, with2809pid=True)
- except:
- filedict=getPiDict(port)
+ filedict = getPiDict(port)
try:
with open(filedict, 'r') as fpid:
# 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
pass
if already_in: break
pass
+
# add process to the dictionary
if not already_in:
import types
# retrieve processes dictionary
from killSalomeWithPort import getPiDict
if port is None: port=findFileDict()
+
# new-style dot-prefixed pidict file
- filedict=getPiDict(port, hidden=True)
+ filedict=getPiDict(port)
# provide compatibility with old-style pidict file (not dot-prefixed)
if not os.path.exists(filedict): filedict = getPiDict(port, hidden=False)
+
try:
with open(filedict, 'r') as fpid:
process_ids=pickle.load(fpid)