Skip to content

Commit

Permalink
Corrected bad env handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeulette committed Oct 10, 2024
1 parent 27df82e commit 6eb6091
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/imio/updates/update_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# sys.path[0:0] = [
# '/srv/instances/dmsmail/src/imio.pyutils', # local
# ]
dev_mode = 0
dev_mode = 2
dev_config = {1: {"bldt": "TAGS/dmsmail3.0"}, 2: {"bldt": "dmsmail"}}
dev_buildout = dev_config.get(dev_mode, {}).get("bldt")

Expand Down Expand Up @@ -379,8 +379,9 @@ def run_function_parts(func_parts, batches_conf, params):
:param params: dict {'buildouts': dict, 'bldt': bldt, 'env': env, 'script': '', 'fct': '', 'params': '', ...}
"""
if func_parts:
original_env = params["env"]
for part in func_parts:
env = params["env"] and "{} ".format(params["env"]) or ""
env = original_env and "{} ".format(original_env) or ""
params["env"] = "{}FUNC_PART={}".format(env, part)
first = 1
last = 2 # so range(1, 2) return [1]
Expand Down

0 comments on commit 6eb6091

Please sign in to comment.