Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sugar/tutorius/bundler.py11
1 files changed, 7 insertions, 4 deletions
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)