Skip to content

Commit

Permalink
For python3, exceptions should use "as err", not ", err"
Browse files Browse the repository at this point in the history
  • Loading branch information
jquast authored and takluyver committed Jun 16, 2014
1 parent cc37760 commit 6447e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pexpect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def read_nonblocking(self, size=1, timeout=-1):
if self.child_fd in r:
try:
s = os.read(self.child_fd, size)
except OSError, err:
except OSError as err:
if err.args[0] == errno.EIO:
# Linux-style EOF
self.flag_eof = True
Expand Down Expand Up @@ -1629,7 +1629,7 @@ def __interact_copy(self, escape_character=None,
if self.child_fd in r:
try:
data = self.__interact_read(self.child_fd)
except OSError, err:
except OSError as err:
if err.args[0] == errno.EIO:
# Linux-style EOF
break
Expand Down

0 comments on commit 6447e5f

Please sign in to comment.