blob: ba8a088900f9c65d786bd162e0a87117383b6ee5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- simple_http_daemon.py.orig 2015-08-12 18:28:10.432593984 +0200
+++ simple_http_daemon.py 2015-08-12 18:36:05.291038788 +0200
@@ -18,7 +18,10 @@
import os
import time
import daemon
-import daemon.pidlockfile
+try:
+ from daemon.pidlockfile import PIDLockFile
+except ImportError:
+ from lockfile.pidlockfile import PIDLockFile
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
@@ -47,7 +50,7 @@
context = daemon.DaemonContext(
working_directory=os.getcwd(),
umask=0o002,
- pidfile=daemon.pidlockfile.PIDLockFile(self.pid_file)
+ pidfile=PIDLockFile(self.pid_file)
)
with context:
self.run_http_server()
|