diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2014-02-04 12:19:15 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2014-02-18 21:20:34 (GMT) |
commit | 6447b7951a66021f288f5b2b0c8cc301257d36ee (patch) | |
tree | 2c7d269a0dba29a6466996889a1c9980971a0e06 /misc/aslo-sync | |
parent | b68085299cee6e5488e8301042cde13d040494ca (diff) |
Polish design
The major points:
* minimize number of resource types
* use aggregated properties instead of resources
* separate blob storage from resources db
Diffstat (limited to 'misc/aslo-sync')
-rwxr-xr-x | misc/aslo-sync | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/aslo-sync b/misc/aslo-sync index f736681..581581a 100755 --- a/misc/aslo-sync +++ b/misc/aslo-sync @@ -527,7 +527,7 @@ class Application(application.Application): (sugar_min, sugar_max), 'license': alicense, }), - bundle_path) as impl: + file(bundle_path, 'rb')) as (impl, data): impl['guid'] = version_id if 'notes' not in impl: impl['notes'] = self.get_i18n_field(releasenotes) @@ -538,9 +538,9 @@ class Application(application.Application): 'order': 0, 'role': 3, 'name': fullname, }} impl['layer'] = layers - impl['data']['url'] = \ + data['url'] = \ '/'.join([DOWNLOAD_URL, str(addon_id), filename]) - impl['data']['blob_size'] = os.stat(bundle_path).st_size + data['size'] = os.stat(bundle_path).st_size except Exception, error: print '-- Failed to sync %r[%s]' % (filename, version_id) traceback.print_exception(*sys.exc_info()) |