Skip to content

Commit b4fd00f

Browse files
committed
Cast USE_PORTAL as a boolean.
1 parent 94b58bc commit b4fd00f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

ipsframework/services.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,16 +2391,22 @@ def run_ensemble(
23912391
:returns: a list of dicts mapping created subdirs to simulation names
23922392
and their parameters
23932393
"""
2394-
23952394
# This should be a unique variable across all ensembles we keep track
23962395
# of in the portal This ID should only be shared by runs within an
23972396
# ensemble
23982397
portal_ensemble_id = str(uuid.uuid4())
23992398

2400-
use_portal = self.get_config_param('USE_PORTAL', silent=True)
2399+
# (Need explicit cast to bool since get_config_param() will return
2400+
# "True" or "False" as a string.)
2401+
use_portal = bool(self.get_config_param('USE_PORTAL',
2402+
silent=True))
24012403
self.debug(f'use portal = {use_portal}')
24022404

2403-
def create_driver_config_file(template, working_dir, variables, name, use_portal):
2405+
def create_driver_config_file(template,
2406+
working_dir,
2407+
variables,
2408+
name,
2409+
use_portal):
24042410
"""Create an IPS config file for an ensemble instance
24052411
24062412
:param template: ConfigObj from which to derive the config file

0 commit comments

Comments
 (0)