From 380f824a61b242d74581e49380abf0a94d57414c Mon Sep 17 00:00:00 2001
From: Impact <pascal.mouquet@ird.fr>
Date: Thu, 12 Nov 2020 15:38:15 +0400
Subject: [PATCH] bugfix in Tile().update_latest_ql mk dir

---
 sen2chain/library.py | 18 ++++++++++++++++++
 sen2chain/tiles.py   |  1 +
 2 files changed, 19 insertions(+)

diff --git a/sen2chain/library.py b/sen2chain/library.py
index e13a162..ae09ba0 100644
--- a/sen2chain/library.py
+++ b/sen2chain/library.py
@@ -203,6 +203,24 @@ class Library:
         """
         for tile in set([val for sublist in [k for k in [getattr(self,t) for t in self.__dict__]] for val in sublist]):
            Tile(tile).init_md()
+    
+    ####################### A FAIRE
+    def compute_l2a(self, 
+                    tile_list: list = [],
+                    ):
+        toto = 12
+    
+    ####################### A FAIRE
+    def compute_cloudmasks(self, 
+                    tile_list: list = [],
+                    ):
+        toto = 15
+        
+    ####################### A FAIRE
+    def compute_indices(self, 
+                    tile_list: list = [],
+                    ):
+        toto = 20
 
 
 
diff --git a/sen2chain/tiles.py b/sen2chain/tiles.py
index 71fac3f..382c1b1 100644
--- a/sen2chain/tiles.py
+++ b/sen2chain/tiles.py
@@ -890,6 +890,7 @@ class Tile:
         l2a = L2aProduct(p)
 
         outfullpath = l2a.path.parent / "QL" / (l2a.tile + '_' + p[0:4] + Tile._get_date(p).strftime("%Y%m%d") + '_QL_latest.jpg')
+        outfullpath.parent.mkdir(parents=True, exist_ok=True)
         old_ql = list((l2a.path.parent / "QL").glob('*_QL_latest.jpg*'))
         liste=[a for a in old_ql if str(outfullpath) not in str(a)]
         for f in liste:
-- 
GitLab