From cade921eb6e5b380e20e3a2c0a61e7a61f25a4a2 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Mon, 17 Nov 2014 10:31:02 +0100 Subject: [PATCH] nc_pps_l2: don't crash on multiple files, just go through them one at the time. Signed-off-by: Martin Raspaud --- mpop/satin/nc_pps_l2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mpop/satin/nc_pps_l2.py b/mpop/satin/nc_pps_l2.py index 774c8e68..286644ce 100644 --- a/mpop/satin/nc_pps_l2.py +++ b/mpop/satin/nc_pps_l2.py @@ -278,7 +278,11 @@ def load(self, satscene, *args, **kwargs): for product in products: LOG.debug("Loading " + product) - if (prodfilename and + if isinstance(prodfilename, (list, tuple, set)): + for fname in prodfilename: + kwargs['filename'] = fname + self.load(satscene, *args, **kwargs) + elif (prodfilename and os.path.basename(prodfilename).split("_")[2] == NEW_PRODNAMES[product]): filename = prodfilename else: