Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/misc/aslo-patch-versions
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2013-11-04 21:05:37 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2013-11-04 21:33:39 (GMT)
commit35588c31ab5270e6c973f59725d2ed009e233feb (patch)
treef213fa95dbde7700596e19d63a777b8ae97b1cb5 /misc/aslo-patch-versions
parent1eff810db0c62174e8d445f15e4b1604665ac18d (diff)
Actualize ASLO sync script
Diffstat (limited to 'misc/aslo-patch-versions')
-rwxr-xr-xmisc/aslo-patch-versions9
1 files changed, 5 insertions, 4 deletions
diff --git a/misc/aslo-patch-versions b/misc/aslo-patch-versions
index 37d2710..ec6b464 100755
--- a/misc/aslo-patch-versions
+++ b/misc/aslo-patch-versions
@@ -20,9 +20,8 @@ import os
from optparse import OptionParser
from os.path import exists
-from sugar_network import db
+from sugar_network import db, model
from sugar_network.node import data_root
-from sugar_network.resources.volume import Volume
from sugar_network.toolkit.bundle import Bundle
from sugar_network.toolkit import Option
@@ -37,7 +36,7 @@ db.index_write_queue.value = 1024 * 10
db.index_flush_threshold.value = 0
db.index_flush_timeout.value = 0
-volume = Volume(data_root.value)
+volume = db.Volume(data_root.value, model.RESOURCES)
volume.populate()
directory = volume['implementation']
try:
@@ -50,7 +49,9 @@ try:
blob_path = '/upload/activities' + url[len(DOWNLOAD_URL):]
if not exists(blob_path):
if 'deleted' not in impl['layer']:
- print '-- Cannot find %r' % blob_path
+ print '-- Delete missed %r' % blob_path
+ impl['layer'].append('deleted')
+ directory.update(impl.guid, {'layer': impl['layer']})
continue
unpack_size = 0
with Bundle(blob_path, mime_type='application/zip') as bundle: