Skip to content

Commit

Permalink
Fixed/uncommented raczben#60
Browse files Browse the repository at this point in the history
Breaks support for sending Windows commands.
  • Loading branch information
Stefanhg committed Sep 30, 2023
1 parent 1b7dd17 commit 2168ff3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions wexpect/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ def __init__(self, command, args=[], timeout=30, encoding='UTF-8', decode_errors
self.args = args[:] # work with a copy
self.args.insert(0, command)
self.command = command

command_with_path = shutil.which(self.command)
if command_with_path is None:
logger.warning('The command was not found or was not executable: %s.' % self.command)
raise ExceptionPexpect(
'The command was not found or was not executable: %s.' % self.command)
self.command = command_with_path
#
# command_with_path = shutil.which(self.command)
# if command_with_path is None:
# logger.warning('The command was not found or was not executable: %s.' % self.command)
# raise ExceptionPexpect(
# 'The command was not found or was not executable: %s.' % self.command)
# self.command = command_with_path
self.args[0] = self.command

self.name = '<' + ' '.join(self.args) + '>'
Expand Down

0 comments on commit 2168ff3

Please sign in to comment.