Skip to content

Commit

Permalink
Merge branch '2.0' into 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Feb 20, 2017
2 parents a16a28a + 168b8b3 commit c28f977
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sites/www/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog
=========

* :bug:`862 (1.17+)` (via :issue:`863`) Avoid test suite exceptions on
platforms lacking ``errno.ETIME`` (which seems to be some FreeBSD and some
Windows environments.) Thanks to Sofian Brabez.
* :bug:`44 (1.17+)` (via :issue:`891`) `SSHClient <paramiko.client.SSHClient>`
now gives its internal `Transport <paramiko.transport.Transport>` a handle on
itself, preventing garbage collection of the client until the session is
Expand Down
8 changes: 6 additions & 2 deletions tests/test_packetizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,13 @@ def test_3_closed(self):
import signal

class TimeoutError(Exception):
pass
def __init__(self, error_message):
if hasattr(errno, 'ETIME'):
self.message = os.sterror(errno.ETIME)
else:
self.messaage = error_message

def timeout(seconds=1, error_message=os.strerror(errno.ETIME)):
def timeout(seconds=1, error_message='Timer expired'):
def decorator(func):
def _handle_timeout(signum, frame):
raise TimeoutError(error_message)
Expand Down

0 comments on commit c28f977

Please sign in to comment.