mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
parent
ec4e69b0d8
commit
87838cb574
@ -158,10 +158,10 @@ def pid_lock(path):
|
||||
pid = None
|
||||
try:
|
||||
with open(path) as f:
|
||||
pid = int(f.read())
|
||||
try:
|
||||
pid = int(f.read())
|
||||
os.kill(pid, 0) # If the proces is not running kill return an error
|
||||
except (OSError, SystemError):
|
||||
except (OSError, SystemError, ValueError):
|
||||
pid = None
|
||||
except OSError as e:
|
||||
log.critical("Can't open pid file %s: %s", pid, str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user