Skip to content

Commit

Permalink
Make sure we resolve virtualenv options properly (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-blanchard committed Dec 5, 2018
1 parent 084846b commit 3c27602
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions streamparse/cli/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ def add_workers(parser):
)


VIRTUALENV_OPTIONS = (
"install_virtualenv",
"use_virtualenv",
"virtualenv_flags",
"virtualenv_root",
)


def resolve_options(
cli_options, env_config, topology_class, topology_name, local_only=False
):
Expand Down Expand Up @@ -290,6 +298,11 @@ def resolve_options(
if isinstance(log_config.get("level"), string_types):
storm_options["pystorm.log.level"] = log_config["level"].lower()

# Make sure virtualenv options are present here
for venv_option in VIRTUALENV_OPTIONS:
if venv_option in env_config:
storm_options[venv_option] = env_config[venv_option]

# Override options with topology options
storm_options.update(topology_class.config)

Expand Down

0 comments on commit 3c27602

Please sign in to comment.