Normal python imports import sys import datetime import os import argp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Normal python imports
import sys
import datetime
import os
import argparse
import logging
def openIndex(indexDirectory):
if os.path.exists(indexDirectory):
try:
index = DirectoryReader.open(SimpleFSDirectory.open(File(indexDirectory)))
except IOError as err:
sLog.error("IOError: " + str(err))
except OSError as err:
sLog.error("OSError: " + str(err))
return index