Always enable console
This commit is contained in:
parent
8bcdb8f3dd
commit
758d9fba43
@ -16,7 +16,7 @@ class LogWriter:
|
|||||||
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
|
self._logger = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Logger')
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
if os.environ.has_key('SUGAR_USE_CONSOLE') and self._use_console:
|
if self._use_console:
|
||||||
sys.stdout = self
|
sys.stdout = self
|
||||||
sys.stderr = self
|
sys.stderr = self
|
||||||
|
|
||||||
|
@ -62,8 +62,6 @@ if curdir == '.':
|
|||||||
else:
|
else:
|
||||||
basedir = os.path.dirname(curdir)
|
basedir = os.path.dirname(curdir)
|
||||||
|
|
||||||
console = False
|
|
||||||
|
|
||||||
if os.path.isfile(os.path.join(curdir, '__uninstalled__.py')):
|
if os.path.isfile(os.path.join(curdir, '__uninstalled__.py')):
|
||||||
if basedir == '':
|
if basedir == '':
|
||||||
print 'Running sugar from current directory...'
|
print 'Running sugar from current directory...'
|
||||||
@ -71,14 +69,11 @@ if os.path.isfile(os.path.join(curdir, '__uninstalled__.py')):
|
|||||||
print 'Running sugar from ' + basedir + ' ...'
|
print 'Running sugar from ' + basedir + ' ...'
|
||||||
add_to_python_path(basedir)
|
add_to_python_path(basedir)
|
||||||
add_to_python_path(os.path.join(basedir, 'cut-n-paste'))
|
add_to_python_path(os.path.join(basedir, 'cut-n-paste'))
|
||||||
console = True
|
|
||||||
else:
|
else:
|
||||||
print 'Running the installed sugar...'
|
print 'Running the installed sugar...'
|
||||||
|
|
||||||
add_to_python_path(os.path.expanduser('~/.sugar/activities'))
|
add_to_python_path(os.path.expanduser('~/.sugar/activities'))
|
||||||
|
|
||||||
if console:
|
|
||||||
os.environ['SUGAR_USE_CONSOLE'] = 'yes'
|
|
||||||
print 'Redirecting output to the console, press ctrl+d to open it.'
|
print 'Redirecting output to the console, press ctrl+d to open it.'
|
||||||
|
|
||||||
from sugar.session.session import Session
|
from sugar.session.session import Session
|
||||||
|
Loading…
Reference in New Issue
Block a user