Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/bundleregistry.py4
-rw-r--r--sugar/env.py9
2 files changed, 7 insertions, 6 deletions
diff --git a/sugar/activity/bundleregistry.py b/sugar/activity/bundleregistry.py
index 182bfcf..02bf302 100644
--- a/sugar/activity/bundleregistry.py
+++ b/sugar/activity/bundleregistry.py
@@ -10,9 +10,7 @@ class _ServiceParser(ConfigParser):
class _ServiceManager(object):
def __init__(self):
- self._path = os.path.expanduser('~/.local/share/dbus-1/services')
- if not os.path.isdir(self._path):
- os.makedirs(self._path)
+ self._path = env.get_user_service_dir()
def add(self, bundle):
name = bundle.get_service_name()
diff --git a/sugar/env.py b/sugar/env.py
index 46c4ed7..24ac69d 100644
--- a/sugar/env.py
+++ b/sugar/env.py
@@ -51,9 +51,6 @@ def get_activity_info_dir():
def get_services_dir():
return sugar_services_dir
-def get_dbus_config():
- return sugar_dbus_config
-
def get_shell_bin_dir():
return sugar_shell_bin_dir
@@ -63,3 +60,9 @@ def get_data_dirs():
return os.environ['XDG_DATA_DIRS'].split(':')
else:
return [ '/usr/local/share/', '/usr/share/' ]
+
+def get_user_service_dir():
+ service_dir = os.path.expanduser('~/.local/share/dbus-1/services')
+ if not os.path.isdir(service_dir):
+ os.makedirs(service_dir)
+ return service_dir