import tempfile
temp = tempfile.NamedTemporaryFile()
lock_file = os.path.join(os.path.dirname(temp.name), ".salome_PortManager.lock")
+ try:
+ with open(lock_file, 'wb'):
+ pass
+ except IOError:
+ pass
temp.close()
return (portmanager_config, lock_file)
config_file, lock_file = _getConfigurationFilename()
oldmask = os.umask(0)
- with open(lock_file, 'wb') as lock:
+ with open(lock_file, 'rb') as lock:
# acquire lock
__acquire_lock(lock)
config_file, lock_file = _getConfigurationFilename()
oldmask = os.umask(0)
- with open(lock_file, 'wb') as lock:
+ with open(lock_file, 'rb') as lock:
# acquire lock
__acquire_lock(lock)