Skip to content

Commit e92e1d4

Browse files
author
Martin Schupfner
committed
Set up force_table_download as both, option and input option
1 parent fd0c235 commit e92e1d4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cc_plugin_cc6/cc6.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,18 @@ def setup(self, dataset):
5151
CORDEX_CMIP6_CMOR_TABLES_URL + "CORDEX-CMIP6_" + table + ".json",
5252
filename,
5353
tables_path,
54-
force="force_table_download" in self.options,
54+
force="force_table_download" in self.options
55+
and (
56+
self.options["force_table_download"] is None
57+
or (
58+
isinstance(self.options["force_table_download"], bool)
59+
and self.options["force_table_download"]
60+
)
61+
or (
62+
isinstance(self.options["force_table_download"], str)
63+
and self.options["force_table_download"].lower() != "false"
64+
)
65+
),
5566
)
5667
if os.path.basename(os.path.realpath(filename_retrieved)) != filename:
5768
raise AssertionError(

0 commit comments

Comments
 (0)