From 4c812eb210b266f8d458b247051135ac967d046f Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 13 Aug 2007 19:14:25 +0000 Subject: Set ACTIVITY_ROOT environment variable. --- (limited to 'sugar/activity/activity.py') 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 -- cgit v0.9.1