Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sugar/bundle/contentbundle.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sugar/bundle/contentbundle.py b/src/sugar/bundle/contentbundle.py
index 3de6414..38d4e51 100644
--- a/src/sugar/bundle/contentbundle.py
+++ b/src/sugar/bundle/contentbundle.py
@@ -168,11 +168,12 @@ class ContentBundle(Bundle):
return self._bundle_class
def _run_indexer(self):
- if os.environ.has_key('XDG_DATA_DIRS'):
- for path in os.environ['XDG_DATA_DIRS'].split(':'):
- indexer = os.path.join(path, 'library-common', 'make_index.py')
- if os.path.exists(indexer):
- os.spawnlp(os.P_WAIT, 'python', 'python', indexer)
+ xdg_data_dirs = os.getenv('XDG_DATA_DIRS',
+ '/usr/local/share/:/usr/share/')
+ for path in xdg_data_dirs.split(':'):
+ indexer = os.path.join(path, 'library-common', 'make_index.py')
+ if os.path.exists(indexer):
+ os.spawnlp(os.P_WAIT, 'python', 'python', indexer)
def is_installed(self):
if self._unpacked: