only setup library path in main, not emulator

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-26 11:09:58 +02:00
parent 3f6c479d72
commit 4eec4d9627

View file

@ -478,15 +478,14 @@ if __name__ == "__main__":
try:
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
# Import generic cdist options
sys.path.insert(0,
os.path.abspath(os.path.join(os.path.dirname(__file__),
'../lib')))
import cdist
if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
emulator()
else:
cdist_lib = os.path.abspath(os.path.join(os.path.dirname(__file__),
'../lib'))
sys.path.insert(0, cdist_lib)
import cdist
import cdist.banner
import cdist.exec
import cdist.path