From 8ed4cda0e35fe965fffa73576d6f24e26b544235 Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Thu, 17 Sep 2009 08:35:04 +0000
Subject: ASLO knows only about stable SP releases #1369
---
extensions/cpsection/updater/backends/aslo.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/extensions/cpsection/updater/backends/aslo.py b/extensions/cpsection/updater/backends/aslo.py
index 443fd1c..5f257f9 100644
a
|
b
|
_FIND_VERSION = './/{http://www.mozilla.org/2004/em-rdf#}version' |
62 | 62 | _FIND_LINK = './/{http://www.mozilla.org/2004/em-rdf#}updateLink' |
63 | 63 | _FIND_SIZE = './/{http://www.mozilla.org/2004/em-rdf#}updateSize' |
64 | 64 | |
65 | | _UPDATE_PATH = 'http://activities.sugarlabs.org/services/update.php' |
| 65 | _UPDATE_PATH = 'http://activities.sugarlabs.org/services/update-aslo.php' |
66 | 66 | |
67 | 67 | _fetcher = None |
68 | 68 | |
… |
… |
class _UpdateFetcher(object): |
72 | 72 | _CHUNK_SIZE = 10240 |
73 | 73 | |
74 | 74 | def __init__(self, bundle, completion_cb): |
| 75 | # ASLO knows only about stable SP releases |
| 76 | major, minor = config.version.split('.')[0:2] |
| 77 | sp_version = '%s.%s' % (major, int(minor) + int(minor) % 2) |
75 | 78 | |
76 | 79 | url = '%s?id=%s&appVersion=%s' % \ |
77 | | (_UPDATE_PATH, bundle.get_bundle_id(), config.version) |
| 80 | (_UPDATE_PATH, bundle.get_bundle_id(), sp_version) |
| 81 | |
| 82 | logging.debug('Fetch %s', url) |
78 | 83 | |
79 | 84 | self._completion_cb = completion_cb |
80 | 85 | self._file = gio.File(url) |