mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
add check for cmdfifo at startup
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys, os, re, time, urllib, pickle, random, HTMLParser
|
import sys, os, re, time, urllib, pickle, random, HTMLParser, stat
|
||||||
from local_config import conf
|
from local_config import conf
|
||||||
|
|
||||||
BUFSIZ = 8192
|
BUFSIZ = 8192
|
||||||
@@ -319,6 +319,14 @@ if '__main__' == __name__:
|
|||||||
VERSION = get_version_git()
|
VERSION = get_version_git()
|
||||||
print sys.argv[0] + ' ' + VERSION
|
print sys.argv[0] + ' ' + VERSION
|
||||||
|
|
||||||
|
if not os.path.exists(fifo_path):
|
||||||
|
logger('error', 'fifo_path "%s" does not exist, exiting' % fifo_path)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
if not stat.S_ISFIFO(os.stat(fifo_path).st_mode):
|
||||||
|
logger('error', 'fifo_path "%s" is not a FIFO, exiting' % fifo_path)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
for f in os.listdir(event_files_dir):
|
for f in os.listdir(event_files_dir):
|
||||||
|
|||||||
Reference in New Issue
Block a user