mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +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:
parent
662d1ce03f
commit
cf363432f0
4
pylink
4
pylink
@ -3,8 +3,10 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
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.
|
# 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
|
import world
|
||||||
world.testing = False
|
world.testing = False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user