Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Sep 29, 2017
1 parent c84efd0 commit 748b78e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def l8_overview_handler(event, context):
info = event.get('queryStringParameters')
scene = info.get('scene')
bands = info.get('bands', [4, 3, 2])
bands = map(int, bands.split(',')) if isinstance(bands, str) else bands
bands = eval(bands) if isinstance(bands, str) else bands
img_format = info.get('format', 'jpeg')

if info.get('ndvi'):
Expand All @@ -81,7 +81,7 @@ def l8_full_handler(event, context):
info = event.get('queryStringParameters')
scene = info.get('scene')
bands = info.get('bands', [4, 3, 2])
bands = map(int, bands.split(',')) if isinstance(bands, str) else bands
bands = eval(bands) if isinstance(bands, str) else bands

if info.get('ndvi'):
l8_full.create_ndvi(scene, bucket)
Expand Down Expand Up @@ -148,7 +148,7 @@ def l8_mosaic_handler(event, context):
scenes = info.get('scenes')
scenes = scenes.split(',') if isinstance(scenes, str) else scenes
bands = info.get('bands', [4, 3, 2])
bands = map(int, bands.split(',')) if isinstance(bands, str) else bands
bands = eval(bands) if isinstance(bands, str) else bands
task_id = info.get('uuid', str(uuid.uuid1()))

l8_mosaic.create(scenes, task_id, os.environ.get('OUTPUT_BUCKET'), bands)
Expand Down

0 comments on commit 748b78e

Please sign in to comment.