Skip to content

Commit

Permalink
checking if command is basestring to split it
Browse files Browse the repository at this point in the history
  • Loading branch information
shabazpatel committed May 3, 2018
1 parent f31ea56 commit 7c9e7ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion datmo/cli/command/task.py
Expand Up @@ -75,10 +75,11 @@ def run(self, **kwargs):
if kwargs['environment_definition_filepath']:
snapshot_dict["environment_definition_filepath"] =\
kwargs['environment_definition_filepath']

if not isinstance(kwargs['cmd'], list):
if platform.system() == "Windows":
kwargs['cmd'] = kwargs['cmd']
elif isinstance(kwargs['cmd'], str):
elif isinstance(kwargs['cmd'], basestring):
kwargs['cmd'] = shlex.split(kwargs['cmd'])

task_dict = {
Expand Down
1 change: 0 additions & 1 deletion datmo/core/controller/task.py
Expand Up @@ -135,7 +135,6 @@ def _run_helper(self, environment_id, options, log_filepath):

# Build image for environment
self.environment.build(environment_id)

# Run container with environment
return_code, run_id, logs = \
self.environment.run(environment_id, run_options, log_filepath)
Expand Down

0 comments on commit 7c9e7ec

Please sign in to comment.