Skip to content

Commit

Permalink
fix(nodejs_base): use self.__class__.__name__ for derived classes com…
Browse files Browse the repository at this point in the history
…mands
  • Loading branch information
varp committed Jan 9, 2018
1 parent 5ebe7cc commit eff22cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/nodejs_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ def run_command(self, command, callback=None, show_status=True,
shell = True
# doing exception for debugger commands to be able
# get PID of node.exe on Windows not cmd.exe
if __class__.__name__.lower().find("drun") != -1:
debug("NodeCommand: run_command: class name", self.__class__.__name__)
if self.__class__.__name__.lower().find("drun") != -1:
shell = False

kwargs['shell'] = shell
debug("NodeCommand: run_command: kwargs", kwargs)

thread = CommandThread(command, callback, **kwargs)
thread.start()
Expand Down
2 changes: 1 addition & 1 deletion lib/nodejs_command_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def run(self):

# Per http://bugs.python.org/issue8557 shell=True is required to
# get $PATH on Windows. Yay portable code.
shell = self.shell
debug("CommandThread: run: self.shell", self.shell)
if self.working_dir != "":
os.chdir(self.working_dir)

Expand Down

0 comments on commit eff22cf

Please sign in to comment.