Make this work also when running from inside sugar/
This commit is contained in:
parent
1f33120951
commit
17b77fc7cc
10
sugar/sugar
10
sugar/sugar
@ -3,8 +3,14 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
basedir = os.path.dirname(os.path.dirname(__file__))
|
||||
if os.path.isfile(os.path.join(basedir, 'sugar', '__uninstalled__.py')):
|
||||
curdir = os.path.dirname(__file__)
|
||||
|
||||
if curdir == '.':
|
||||
basedir = os.path.dirname(os.getcwd())
|
||||
else:
|
||||
basedir = os.path.dirname(curdir)
|
||||
|
||||
if os.path.isfile(os.path.join(curdir, '__uninstalled__.py')):
|
||||
if basedir == '':
|
||||
print "Running sugar from current directory..."
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user