mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Don't crash if pid creation fails. Fixes #482
This commit is contained in:
parent
5773472eeb
commit
6df93c16a1
1 changed files with 5 additions and 3 deletions
|
@ -1005,9 +1005,11 @@ class PosixProcess():
|
||||||
|
|
||||||
if not self.lasterror:
|
if not self.lasterror:
|
||||||
# Write my pid into pidFile to keep multiple copies of program from running
|
# Write my pid into pidFile to keep multiple copies of program from running
|
||||||
|
try:
|
||||||
fp = open(self.pidpath, 'w')
|
fp = open(self.pidpath, 'w')
|
||||||
fp.write(str(os.getpid()))
|
fp.write(str(os.getpid()))
|
||||||
fp.close()
|
fp.close()
|
||||||
|
except: pass
|
||||||
|
|
||||||
return self.lasterror
|
return self.lasterror
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue