Fix the panic message so that it looks more like M5's panic.
Make it so the same path is not added to the system path twice. --HG-- extra : convert_revision : fe18db38cc4e335ad3525a364e9f8faf62b60e52
This commit is contained in:
parent
6eaa4d3571
commit
89ba024b98
1 changed files with 3 additions and 2 deletions
|
@ -36,11 +36,12 @@ env = {}
|
|||
env.update(os.environ)
|
||||
|
||||
def panic(*args, **kwargs):
|
||||
sys.exit(*args, **kwargs)
|
||||
print >>sys.stderr, 'panic:', string
|
||||
sys.exit(1)
|
||||
|
||||
def AddToPath(path):
|
||||
path = os.path.realpath(path)
|
||||
if os.path.isdir(path):
|
||||
if os.path.isdir(path) and path not in sys.path:
|
||||
sys.path.append(path)
|
||||
|
||||
def Import(path):
|
||||
|
|
Loading…
Reference in a new issue