projects
/
ais.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd79379
)
Use ais.daemon when daemon is not available
author
Jean-Michel Nirgal Vourgère
<jmv@nirgal.com>
Wed, 18 Aug 2010 21:23:46 +0000
(21:23 +0000)
committer
Jean-Michel Nirgal Vourgère
<jmv@nirgal.com>
Wed, 18 Aug 2010 21:23:46 +0000
(21:23 +0000)
bin/inputs/run.py
patch
|
blob
|
history
diff --git
a/bin/inputs/run.py
b/bin/inputs/run.py
index 277bf430eabe044fa3741ceba0b42f36884f20de..87dd091e0837a6b2b7228e637d794bd6d76a9aeb 100644
(file)
--- a/
bin/inputs/run.py
+++ b/
bin/inputs/run.py
@@
-39,8
+39,12
@@
def main():
if options.daemonize:
- from daemon import DaemonContext
- stderr = file('/var/log/ais/daemon.stderr', 'w+', 0o664)
+ try:
+ from daemon import DaemonContext
+ except ImportError:
+ from ais.daemon import DaemonContext
+
+ stderr = file('/var/log/ais/daemon.stderr', 'w+', 0664)
dctx = DaemonContext(stdout=stderr, stderr=stderr, umask=002)
dctx.open()