소켓 파일이 없을 때 에러 처리 추가
This commit is contained in:
parent
b08030819b
commit
653f32d25f
14
epg2xml.py
14
epg2xml.py
@ -16,7 +16,7 @@ import argparse
|
|||||||
reload(sys)
|
reload(sys)
|
||||||
sys.setdefaultencoding('utf-8')
|
sys.setdefaultencoding('utf-8')
|
||||||
|
|
||||||
__version__ = '1.0.8'
|
__version__ = '1.0.9'
|
||||||
|
|
||||||
# Set My Configuration
|
# Set My Configuration
|
||||||
default_icon_url = '' # TV channel icon url (ex : http://www.example.com/Channels)
|
default_icon_url = '' # TV channel icon url (ex : http://www.example.com/Channels)
|
||||||
@ -525,10 +525,14 @@ else:
|
|||||||
if args.outfile:
|
if args.outfile:
|
||||||
sys.stdout = codecs.open(args.outfile, 'w+', encoding='utf-8')
|
sys.stdout = codecs.open(args.outfile, 'w+', encoding='utf-8')
|
||||||
elif args.socket:
|
elif args.socket:
|
||||||
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
try:
|
||||||
sock.connect(args.socket)
|
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||||
sockfile = sock.makefile('w+')
|
sock.connect(args.socket)
|
||||||
sys.stdout = sockfile
|
sockfile = sock.makefile('w+')
|
||||||
|
sys.stdout = sockfile
|
||||||
|
except socket.error
|
||||||
|
printError("xmltv.sock 파일을 찾을 수 없습니다.")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
getEpg()
|
getEpg()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user