[Dextrose] [PATCH sugar] Pass sugar version to micro-format.php ASLO call
Aleksey Lim
alsroot at member.fsf.org
Wed Jan 19 11:44:51 EST 2011
---
.../cpsection/updater/backends/microformat.py | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/extensions/cpsection/updater/backends/microformat.py b/extensions/cpsection/updater/backends/microformat.py
index 97499aa..6abc185 100644
--- a/extensions/cpsection/updater/backends/microformat.py
+++ b/extensions/cpsection/updater/backends/microformat.py
@@ -27,8 +27,6 @@ import gconf
from jarabe import config
-client = gconf.client_get_default()
-_UPDATE_PATH = client.get_string('/desktop/sugar/updater_url')
_ACTIVITIES_LIST = {}
ACTION_CHECKING = 0
ACTION_UPDATING = 1
@@ -167,7 +165,15 @@ class _UpdateFetcher(gobject.GObject):
def download_bundle_updates(self):
self.emit('progress', ACTION_CHECKING, 'Fetching update '
'information', 1, 3)
- self._url = _UPDATE_PATH
+
+ client = gconf.client_get_default()
+ self._url = client.get_string('/desktop/sugar/updater_url')
+ if '?' in self._url:
+ self._url += '&'
+ else:
+ self._url += '?'
+ self._url += 'sugar=' + '.'.join(config.version.split('.')[0:2])
+
self._file = gio.File(self._url)
logging.debug('Fetch %s', self._url)
self._file.read_async(self.__read_async_cb)
--
1.7.3.4
More information about the Dextrose
mailing list