Skip to content

Commit

Permalink
Call send() just once in sendline()
Browse files Browse the repository at this point in the history
  • Loading branch information
jdemeyer committed Dec 13, 2015
1 parent 3451858 commit 1ac02c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pexpect/pty_spawn.py
Expand Up @@ -525,10 +525,8 @@ def sendline(self, s=''):
written. Only a limited number of bytes may be sent for each
line in the default terminal mode, see docstring of :meth:`send`.
'''

n = self.send(s)
n = n + self.send(self.linesep)
return n
s = self._coerce_send_string(s)
return self.send(s + self.linesep)

def _log_control(self, s):
"""Write control characters to the appropriate log files"""
Expand Down

0 comments on commit 1ac02c5

Please sign in to comment.