Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-06-04 06:46:03 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-06-04 06:46:03 (GMT)
commitcef6aa78a5d1ee6a6ecf014ec7690e0b744ee871 (patch)
treec462ab9c587c53dd002117b67b26fd58c6298789 /utils.py
parentccdb2ec15a710d033c62086c5a4280a6a05c2db1 (diff)
more elegant name of .xo
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 36a8af9..c0c7d54 100644
--- a/utils.py
+++ b/utils.py
@@ -92,6 +92,8 @@ def download_activity(id, progress_function):
activity_obj = store_list[id]
name = activity_obj[1]
+ name = name.lower()
+ name = name.replace(' ', '_')
n = activity_obj[0]
web = 'http://activities.sugarlabs.org/es-ES/sugar/downloads/latest/'
web = web + n + '/addon-' + n + '-latest.xo'
@@ -103,8 +105,8 @@ def download_activity(id, progress_function):
progress_function(progress)
- xo = '%s.xo' % name + '-' + version
- file_path = os.path.join(activity.get_activity_root(), "data", "%s" % (xo))
+ xo = name + '-' + version + '.xo'
+ file_path = os.path.join(activity.get_activity_root(), "data", xo)
_logger.info("Downloading activity (%s)")
urllib.urlretrieve(web,