@@ -269,15 +269,17 @@ def main(args):
269269 elif args .subs == 'download' :
270270 d = Downloader (download_dir = args .dest )
271271 try :
272- if d .download (args .scenes , convert_to_integer_list (args .bands )):
273- if args .process :
272+ downloaded = d .download (args .scenes , convert_to_integer_list (args .bands ))
273+
274+ if args .process :
275+ for scene , src in downloaded .iteritems ():
274276 if args .dest :
275- path = join (args .dest , args . scenes [ 0 ] )
277+ path = join (args .dest , scene )
276278 else :
277- path = join (settings .DOWNLOAD_DIR , args . scenes [ 0 ] )
279+ path = join (settings .DOWNLOAD_DIR , scene )
278280
279281 # Keep using Google if the image is before 2015
280- if ( int ( args . scenes [ 0 ][ 12 ]) < 5 or not args . bands ) :
282+ if src == 'google' :
281283 path = path + '.tar.bz'
282284
283285 stored = process_image (path , args .bands , False , args .pansharpen )
@@ -291,9 +293,11 @@ def main(args):
291293 return ["Connection timeout. Probably the region parameter is incorrect" , 1 ]
292294 u .run (args .bucket , get_file (stored ), stored )
293295
294- return ["The output is stored at %s" % stored ]
295- else :
296- return ['Download Completed' , 0 ]
296+ v .output ("The output is stored at %s" % stored , normal = True , arrow = True )
297+
298+ return ['Image Processing Completed' , 0 ]
299+ else :
300+ return ['Download Completed' , 0 ]
297301 except IncorrectSceneId :
298302 return ['The SceneID provided was incorrect' , 1 ]
299303
0 commit comments