Fix the path to the makeindex and and missing import #2856

This commit is contained in:
Simon Schampijer 2007-11-29 14:50:44 +01:00
parent 6e1065454d
commit 8c72c80337
2 changed files with 6 additions and 5 deletions

View File

@ -21,7 +21,8 @@ from ConfigParser import ConfigParser
import os import os
from sugar import env from sugar import env
from sugar.bundle.bundle import Bundle, NotInstalledException from sugar.bundle.bundle import Bundle, NotInstalledException, \
MalformedBundleException
class ContentBundle(Bundle): class ContentBundle(Bundle):
"""A Sugar content bundle """A Sugar content bundle
@ -162,7 +163,7 @@ class ContentBundle(Bundle):
def _run_indexer(self): def _run_indexer(self):
os.spawnlp(os.P_WAIT, 'python', os.spawnlp(os.P_WAIT, 'python',
'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): def is_installed(self):
if self._unpacked: if self._unpacked:

View File

@ -18,7 +18,7 @@
import os import os
def _get_prefix_path(base, path=None): def get_prefix_path(base, path=None):
if os.environ.has_key('SUGAR_PREFIX'): if os.environ.has_key('SUGAR_PREFIX'):
prefix = os.environ['SUGAR_PREFIX'] prefix = os.environ['SUGAR_PREFIX']
else: else:
@ -78,10 +78,10 @@ def get_user_library_path():
return os.path.expanduser('~/Library') return os.path.expanduser('~/Library')
def get_locale_path(path=None): 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): def get_bin_path(path=None):
return _get_prefix_path('bin', path) return get_prefix_path('bin', path)
def get_service_path(name): def get_service_path(name):
return _get_sugar_path('services', name) return _get_sugar_path('services', name)