mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-19 07:48:10 +00:00
Make sure we don't try to read when opening a file in binary more. Fixes #1301.
This commit is contained in:
@ -160,7 +160,7 @@ def pid_lock(path):
|
||||
with open(path) as f:
|
||||
try:
|
||||
pid = int(f.read())
|
||||
os.kill(pid, 0) # If the proces is not running kill return an error
|
||||
os.kill(pid, 0) # kill returns an error if the process is not running
|
||||
except (OSError, SystemError, ValueError):
|
||||
pid = None
|
||||
except OSError as e:
|
||||
|
Reference in New Issue
Block a user