Skip to content

Commit

Permalink
Improve vmware error message for easier copy paste
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-duponchelle committed Nov 28, 2016
1 parent a776b36 commit 60a145a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gns3server/compute/vmware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import subprocess
import logging
import codecs
import shlex

from collections import OrderedDict
from gns3server.utils.interfaces import interfaces
Expand Down Expand Up @@ -379,7 +380,7 @@ def _execute(self, subcommand, args, timeout=120, log_level=logging.INFO):

command = [vmrun_path, "-T", self.host_type, subcommand]
command.extend(args)
command_string = " ".join(command)
command_string = " ".join([shlex.quote(c) for c in command])
log.log(log_level, "Executing vmrun with command: {}".format(command_string))
try:
process = yield from asyncio.create_subprocess_exec(*command, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
Expand Down

0 comments on commit 60a145a

Please sign in to comment.