3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

pylink: use abspath() to get the source directory

Ref #181: Fixes crash on start when PyLink is run without the current
directory being specified: e.g. "python pylink" instead of "python
./pylink"
This commit is contained in:
James Lu 2016-03-27 21:24:55 -07:00
parent 662d1ce03f
commit cf363432f0

4
pylink
View File

@ -3,8 +3,10 @@
import os
import sys
# Change directory to the folder containing PyLink's source
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# This must be done before conf imports, so we get the real conf instead of testing one.
os.chdir(os.path.dirname(__file__))
import world
world.testing = False