From 6c00a205a02398b2a884dcee38e72ef0c19616c3 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Savard Date: Wed, 15 Apr 2009 20:24:57 +0000 Subject: Update bundler.py --- (limited to 'src') diff --git a/src/sugar/tutorius/bundler.py b/src/sugar/tutorius/bundler.py index a98e130..fc25b7a 100644 --- a/src/sugar/tutorius/bundler.py +++ b/src/sugar/tutorius/bundler.py @@ -38,6 +38,9 @@ class TutorialStore: given activity. """ + TUT_STORE_ROOT = os.getenv("$SUGAR_PREFIX") + "/share/tutorius/Data" + TUT_BUNDLE_ROOT = os.getenv("$SUGAR_BUNDLE_PATH") + "/data/tutorius/Data" + logging.debug("*********** Path of TUT_STORE_ROOT : " + TUT_STORE_ROOT) # Create /data/tutorius if no exists @@ -217,7 +220,7 @@ class TutorialBundler: """ NotImplementedError - def get_ini_file_path(self): + def get_tutorial_path(self): """ Return the path of the .ini file associated with the guiven guid set in the Guid property of the Tutorial_Bundler. If the guid is present in @@ -244,7 +247,7 @@ class TutorialBundler: xml_filename = config.get(INI_METADATA_SECTION, INI_XML_FSM_PROPERTY) - path = TUT_STORE_ROOT + "/" + self.Guid + "/" + file_name + path = TUT_STORE_ROOT + "/" + self.Guid return path logging.debug("************ Path of TUT_BUNDLE_ROOT folder of activity : " \ @@ -257,7 +260,7 @@ class TutorialBundler: + file_name) config.read(file_name) if config.get(INI_METADATA_SECTION, INI_GUID_PROPERTY) == guid: - path = TUT_BUNDLE_ROOT + "/" + self.Guid + "/" + file_name + path = TUT_BUNDLE_ROOT + "/" + self.Guid return path if path is None: @@ -276,7 +279,7 @@ class TutorialBundler: config = SafeConfigParser() if guid is not None: - path = get_ini_file_path() + path = get_tutorial_path() + "/meta.ini" config.read(path) xml_filename = config.get(INI_METADATA_SECTION, INI_XML_FSM_PROPERTY) save_fsm(fsm, xml_filename, TUT_STORE_ROOT) -- cgit v0.9.1