[Enhancement] Skip non-existing files to avoid error. This is for better error handling.

This commit is contained in:
Li Fanxi 2010-11-30 22:02:48 +08:00
parent 57cd538894
commit f53a5d33ec

View File

@ -74,7 +74,8 @@ class SNBInput(InputFormatPlugin):
chapterSrc = ch.get('src')
fname = 'ch_%d.htm' % i
data = snbFile.GetFileStream('snbc/' + chapterSrc)
if data != None:
if data == None:
continue
snbc = etree.fromstring(data)
outputFile = open(os.path.join(tdir, fname), 'wb')
lines = []