Fix the path to the makeindex and and missing import #2856
This commit is contained in:
parent
6e1065454d
commit
8c72c80337
@ -21,7 +21,8 @@ from ConfigParser import ConfigParser
|
||||
import os
|
||||
|
||||
from sugar import env
|
||||
from sugar.bundle.bundle import Bundle, NotInstalledException
|
||||
from sugar.bundle.bundle import Bundle, NotInstalledException, \
|
||||
MalformedBundleException
|
||||
|
||||
class ContentBundle(Bundle):
|
||||
"""A Sugar content bundle
|
||||
@ -162,7 +163,7 @@ class ContentBundle(Bundle):
|
||||
def _run_indexer(self):
|
||||
os.spawnlp(os.P_WAIT, 'python',
|
||||
'python',
|
||||
os.path.join(env.get_user_library_path(), 'makeIndex.py'))
|
||||
env.get_prefix_path('share/library-common/make_index.py'))
|
||||
|
||||
def is_installed(self):
|
||||
if self._unpacked:
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
import os
|
||||
|
||||
def _get_prefix_path(base, path=None):
|
||||
def get_prefix_path(base, path=None):
|
||||
if os.environ.has_key('SUGAR_PREFIX'):
|
||||
prefix = os.environ['SUGAR_PREFIX']
|
||||
else:
|
||||
@ -78,10 +78,10 @@ def get_user_library_path():
|
||||
return os.path.expanduser('~/Library')
|
||||
|
||||
def get_locale_path(path=None):
|
||||
return _get_prefix_path('share/locale', path)
|
||||
return get_prefix_path('share/locale', path)
|
||||
|
||||
def get_bin_path(path=None):
|
||||
return _get_prefix_path('bin', path)
|
||||
return get_prefix_path('bin', path)
|
||||
|
||||
def get_service_path(name):
|
||||
return _get_sugar_path('services', name)
|
||||
|
Loading…
Reference in New Issue
Block a user