From c7b890f55410a345134b6ff7dfcea03f5d73868c Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Thu, 04 Oct 2012 17:37:30 +0000 Subject: Return Context.dependencies from deplist command --- diff --git a/TODO b/TODO index 72eef8e..71210c1 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ +- use Context.dependencies while processing feed request - from service API, return 304 HTTP status w/o pinging remote SN server - check if moon icon is uptodate - reuse the same data dir for all SN resources for the same context diff --git a/sugar_network/resources/volume.py b/sugar_network/resources/volume.py index df43c26..c849570 100644 --- a/sugar_network/resources/volume.py +++ b/sugar_network/resources/volume.py @@ -288,11 +288,12 @@ class VolumeCommands(ad.VolumeCommands): """ enforce(document == 'context') + context = self.volume['context'].get(guid) versions, total = self.volume['implementation'].find( limit=1, order_by='-version', context=guid, layer=layer) enforce(total, ad.NotFound, 'No implementations') - result = [] + result = context['dependencies'] spec = [i for i in versions][0]['spec'] for dep in spec.get('*-*', {}).get('requires', {}).keys(): -- cgit v0.9.1