diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-08-13 19:14:25 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-08-13 19:14:25 (GMT) |
commit | 4c812eb210b266f8d458b247051135ac967d046f (patch) | |
tree | bfdbc2f983657dc9b5e90d86abfe857767c1af45 /sugar/activity/activity.py | |
parent | b7e509b21b1adc073eda27052fc072516669fe66 (diff) |
Set ACTIVITY_ROOT environment variable.
Diffstat (limited to 'sugar/activity/activity.py')
-rw-r--r-- | sugar/activity/activity.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index 2c887b9..262d89b 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -305,6 +305,18 @@ class Activity(Window, gtk.Container): def _internal_jobject_error_cb(self, err): logging.debug("Error creating activity datastore object: %s" % err) + def get_activity_root(self): + """ + Return the appropriate location in the fs where to store activity related + data that doesn't pertain to the current execution of the activity and + thus cannot go into the DataStore. + """ + if os.environ.has_key('SUGAR_ACTIVITY_ROOT') and \ + os.environ['SUGAR_ACTIVITY_ROOT']: + return os.environ['SUGAR_ACTIVITY_ROOT'] + else: + return '/' + def read_file(self, file_path): """ Subclasses implement this method if they support resuming objects from |