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