Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2007-12-03 21:10:14 (GMT)
committer Simon Schampijer <simon@schampijer.de>2007-12-03 21:10:14 (GMT)
commitdc8809cdc6def6ea6a0bf1d1a01534fb980cbfbe (patch)
tree64384807e4f6f627c41a890717c7b5726948af42 /lib
parent5e942edddcc2596192aace300811406dd18d9a81 (diff)
Move get_activity_root to module part of #5221
Diffstat (limited to 'lib')
-rw-r--r--lib/sugar/activity/activity.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sugar/activity/activity.py b/lib/sugar/activity/activity.py
index 2b227af..7c44981 100644
--- a/lib/sugar/activity/activity.py
+++ b/lib/sugar/activity/activity.py
@@ -549,7 +549,10 @@ class Activity(Window, gtk.Container):
logging.debug("Error creating activity datastore object: %s" % err)
def get_activity_root(self):
- """Returns a path for saving Activity specific preferences, etc.
+ """ FIXME: Deprecated. This part of the API has been moved
+ out of this class to the module itself
+
+ Returns a path for saving Activity specific preferences, etc.
Returns a path to the location in the filesystem where the activity can
store activity related data that doesn't pertain to the current
@@ -895,3 +898,10 @@ def get_bundle_path():
"""Return the bundle path for the current process' bundle"""
return os.environ['SUGAR_BUNDLE_PATH']
+def get_activity_root():
+ """Returns a path for saving Activity specific preferences, etc."""
+ if os.environ.has_key('SUGAR_ACTIVITY_ROOT') and \
+ os.environ['SUGAR_ACTIVITY_ROOT']:
+ return os.environ['SUGAR_ACTIVITY_ROOT']
+ else:
+ raise RuntimeError("No SUGAR_ACTIVITY_ROOT set.")