diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-08-14 19:24:01 (GMT) |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-08-14 19:24:01 (GMT) |
commit | d93122bf5e8622f6c8ede4b3b80295f9b8511425 (patch) | |
tree | 3eb27e91975eeef66d55df0f7608e28b463f177f /sugar/activity/activity.py | |
parent | 7368429ad6feadd9e81757433b68b63d9d27c04f (diff) | |
parent | 0e4eccd49b056e5aebe71ffa46d462e15fd7a883 (diff) |
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
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 |