config_file, lock_file = _getConfigurationFilename()
oldmask = os.umask(0)
- with open(lock_file, 'w') as lock:
+ with open(lock_file, 'wb') as lock:
# acquire lock
__acquire_lock(lock)
config_file, lock_file = _getConfigurationFilename()
oldmask = os.umask(0)
- with open(lock_file, 'w') as lock:
+ with open(lock_file, 'wb') as lock:
# acquire lock
__acquire_lock(lock)
def getBusyPorts():
config_file, lock_file = _getConfigurationFilename()
oldmask = os.umask(0)
- with open(lock_file, 'w') as lock:
+ with open(lock_file, 'wb') as lock:
# acquire lock
__acquire_lock(lock)
from killSalomeWithPort import getPiDict
if port is None: port=findFileDict()
filedict = getPiDict(port)
+ #filedict = getPiDict(port).encode()
try:
- with open(filedict, 'r') as fpid:
+ with open(filedict, 'rb') as fpid:
process_ids=pickle.load(fpid)
except:
process_ids=[]
process_ids.append({int(command_pid): [command]})
dir = os.path.dirname(filedict)
if not os.path.exists(dir): os.makedirs(dir, 0o777)
- with open(filedict,'w') as fpid:
+ with open(filedict,'wb') as fpid:
pickle.dump(process_ids, fpid)
except:
if verbose(): print("addToKillList: can not add command %s : %s to the kill list" % ( str(command_pid), command ))
if not os.path.exists(filedict): filedict = getPiDict(port, hidden=False)
try:
- with open(filedict, 'r') as fpid:
+ with open(filedict, 'rb') as fpid:
process_ids=pickle.load(fpid)
except:
process_ids=[]
port = int(port)
try:
- with open(filedict, 'r') as fpid:
+ with open(filedict, 'rb') as fpid:
process_ids=pickle.load(fpid)
for process_id in process_ids:
for pid, cmd in list(process_id.items()):