Use __file__, not sys.argv[0]

(Bitbake rev: 97e92abe49663eee189c89c1dc91fe69891faf73)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson 2010-11-26 10:08:05 -07:00 committed by Richard Purdie
parent 8a938d567f
commit 6810622484
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
import os
import sys, logging
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])),
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)),
'lib'))
import optparse

View File

@ -20,7 +20,7 @@
import optparse, os, sys
# bitbake
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__), 'lib'))
import bb
import bb.parse
from string import split, join