diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-11-05 17:14:00 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-11-05 17:14:00 (GMT) |
commit | ee62ed69b4033fbdbb1c5a613eb5a100205022a1 (patch) | |
tree | 28121dfc9dc6cf51732158a83f5d7a7dce18d9c5 /shell | |
parent | 4b328c84176fb9142112600d80c55a81e529176d (diff) |
Pick up system bundles even if xdg dir env is undefined
Diffstat (limited to 'shell')
-rw-r--r-- | shell/model/ShellModel.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/model/ShellModel.py b/shell/model/ShellModel.py index e87dc12..54b7ebc 100644 --- a/shell/model/ShellModel.py +++ b/shell/model/ShellModel.py @@ -21,6 +21,7 @@ from sugar.activity.bundleregistry import BundleRegistry from model.Friends import Friends from model.MeshModel import MeshModel from model.Owner import ShellOwner +from sugar import env class ShellModel: def __init__(self): @@ -40,10 +41,9 @@ class ShellModel: path = os.path.expanduser('~/Activities') self._bundle_registry.add_search_path(path) - if os.environ.has_key('XDG_DATA_DIRS'): - for path in os.environ['XDG_DATA_DIRS'].split(':'): - bundles_path = os.path.join(path, 'activities') - self._bundle_registry.add_search_path(bundles_path) + for path in env.get_data_dirs(): + bundles_path = os.path.join(path, 'activities') + self._bundle_registry.add_search_path(bundles_path) def get_bundle_registry(self): return self._bundle_registry |