From ef0d7d19eaf7da28eda04ea32634ad3b94a275ac Mon Sep 17 00:00:00 2001 From: Andrew Player Date: Wed, 2 Oct 2024 15:57:20 -0400 Subject: [PATCH] raise error if both gslc-bucket and granules are provided --- src/hyp3_srg/time_series.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hyp3_srg/time_series.py b/src/hyp3_srg/time_series.py index 319a4c8..2a83fb0 100644 --- a/src/hyp3_srg/time_series.py +++ b/src/hyp3_srg/time_series.py @@ -342,6 +342,9 @@ def time_series( if not sbas_dir.exists(): mkdir(sbas_dir) + if granules and gslc_bucket: + raise ValueError('One of a list of granules or a s3 bucket must be provided, but got both.') + if granules == []: if gslc_bucket is None: raise ValueError('Either a list of granules or a s3 bucket must be provided, but got neither.')