From fe8c9b6cc9f3da2aa5a55c2697f78c06e0932a0c Mon Sep 17 00:00:00 2001
From: Valentin Genin <valentin.genin@cnes.fr>
Date: Tue, 17 Mar 2020 12:04:26 +0000
Subject: [PATCH] Fix light_version condition from str to bool

---
 python_src/SAR_MultiSlc.py    | 4 ++--
 python_src/SAR_MultiSlc_IW.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/python_src/SAR_MultiSlc.py b/python_src/SAR_MultiSlc.py
index e48f8d0..33f309f 100644
--- a/python_src/SAR_MultiSlc.py
+++ b/python_src/SAR_MultiSlc.py
@@ -544,7 +544,7 @@ if __name__ == "__main__":
             func_utils.silentremove(output_dir, interf_roi)
 
 
-        if light_version == "yes":
+        if light_version is True:
             func_utils.log(logging.INFO, "\n Removing files for light version \n")
             func_utils.silentremove(output_dir, dop_file)
             func_utils.silentremove(output_dir, demProj_Slave)
@@ -559,7 +559,7 @@ if __name__ == "__main__":
             func_utils.silentremove(output_dir, i_file)
 
 
-    if light_version == "yes":
+    if light_version is True:
         func_utils.log(logging.INFO, "\n Removing files for light version \n")
         if os.path.exists(os.path.join(master_data_dir, dop_file)):
             func_utils.silentremove(master_data_dir, dop_file)
diff --git a/python_src/SAR_MultiSlc_IW.py b/python_src/SAR_MultiSlc_IW.py
index be01621..ef8c738 100644
--- a/python_src/SAR_MultiSlc_IW.py
+++ b/python_src/SAR_MultiSlc_IW.py
@@ -372,7 +372,7 @@ if __name__ == "__main__":
 
 
             # Master deramp
-            if light_version == "no":
+            if light_version is not True:
                 masterDeramp = os.path.splitext(master_Image_base)[0]+"_deramp.tif"
                 Con_masterDeramp = os.path.join(master_data_dir, masterDeramp)
                 diapOTBApp.concatenate(Deramp_BurstToConcatenateM, master_Image, firstBurst, Con_masterDeramp)
@@ -393,7 +393,7 @@ if __name__ == "__main__":
 
         # ###### Concatenating and georeferencing bursts ###### #
         # Slave Deramp
-        if light_version == "no":
+        if light_version is not True:
             Con_slaveDeramp = os.path.splitext(master_Image_base)[0] + "_deramp.tif"
             diapOTBApp.concatenate(Deramp_BurstToConcatenateS, slave_Image, firstBurst, Con_slaveDeramp)
 
-- 
GitLab