Skip to content

Commit

Permalink
Drop shlex.join since it is not in Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Nov 18, 2022
1 parent 867532a commit 18ebc28
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions gravity/process_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ def _service_format_vars(self, config, service, pm_format_vars=None):
if config.service_command_style in (ServiceCommandStyle.direct, ServiceCommandStyle.exec):
format_vars["command_arguments"] = service.get_command_arguments(format_vars)
format_vars["command"] = service.command_template.format(**format_vars)
# normalize quoting to replace '/foo/bar baz'/quux with '/foo/bar baz/quux', either is valid but the former
# is ugly and difficult to read
format_vars["command"] = shlex.join(shlex.split(format_vars["command"]))

# template env vars
environment = service.environment
Expand All @@ -129,7 +126,6 @@ def _service_format_vars(self, config, service, pm_format_vars=None):
if service.count > 1:
instance_number_opt = f" --service-instance {pm_format_vars['instance_number']}"
format_vars["command"] = f"{galaxyctl} --config-file {config_file} exec{instance_number_opt} {config.instance_name} {service.service_name}"
format_vars["command"] = shlex.join(shlex.split(format_vars["command"]))
environment = {}
format_vars["environment"] = self._service_environment_formatter(environment, format_vars)

Expand Down

0 comments on commit 18ebc28

Please sign in to comment.