diff options
author | Daniel Drake <dsd@laptop.org> | 2008-07-15 16:12:16 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2008-07-16 14:36:09 (GMT) |
commit | cc8e682ab03fc38d56202823e0120bb62cdfcc3e (patch) | |
tree | 4ef2f4851aa59f2649252a56331c3bf00770a619 /src/sugar/bundle | |
parent | d17347cc19661910b94c126c11e6e320995aaf06 (diff) |
#7523 library regeneration fails as XDG_DATA_DIRS is unset
The XDG specs say that a default value should be used if it is not set
Diffstat (limited to 'src/sugar/bundle')
-rw-r--r-- | src/sugar/bundle/contentbundle.py | 11 |
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: |