Commit ae6b42a3 authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: python script run without error if nothing is modified

parent b2cd9d96
#! /usr/bin/python
from sys import exit
import otbApplication
if __name__ == "__main__":
......@@ -20,6 +21,9 @@ if __name__ == "__main__":
# END OF GAP
###############
if not "dataset_folder" in d:
exit("Your data folder (\'d[\"dataset_folder\"]\') is not set.")
d["image_name"] = "SENTINEL2A_20170407-154054-255_L2A_T17MNP_D_V1-4"
d["input_path"] = d["dataset_folder"] + "/" + d["image_name"] +"/"
d["B3_image"] = d["image_name"] + "_FRE_B3.tif"
......
#! /usr/bin/python
from sys import exit
import otbApplication
......@@ -19,6 +20,9 @@ if __name__ == "__main__":
# END OF GAP
# ---
if not "dataset_folder" in d:
exit("Your data folder (\'d[\"dataset_folder\"]\') is not set.")
d["image_name"] = "SENTINEL2A_20170407-154054-255_L2A_T17MNP_D_V1-4"
d["input_path"] = d["dataset_folder"] + "/" + d["image_name"] +"/"
d["B3_image"] = d["image_name"] + "_FRE_B3.tif"
......
#! /usr/bin/python
from sys import exit
import otbApplication
......@@ -19,6 +20,9 @@ if __name__ == "__main__":
# END OF GAP
# ---
if not "dataset_folder" in d:
exit("Your data folder (\'d[\"dataset_folder\"]\') is not set.")
d["image_name"] = "SENTINEL2A_20170407-154054-255_L2A_T17MNP_D_V1-4"
d["input_path"] = d["dataset_folder"] + "/" + d["image_name"] +"/"
d["B3_image"] = d["image_name"] + "_FRE_B3.tif"
......
#! /usr/bin/python
from sys import argv
from sys import exit,argv
import otbApplication
......@@ -22,6 +22,10 @@ if __name__ == "__main__":
d["image_name"] = argv[1]
else:
d["image_name"] = "SENTINEL2A_20170407-154054-255_L2A_T17MNP_D_V1-4"
if not "dataset_folder" in d:
exit("Your data folder (\'d[\"dataset_folder\"]\') is not set.")
d["input_path"] = d["dataset_folder"] + "/" + d["image_name"] +"/"
d["B3_image"] = d["image_name"] + "_FRE_B3.tif"
d["B4_image"] = d["image_name"] + "_FRE_B4.tif"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment