Skip to content

Commit

Permalink
Merge branch '1.12' into 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Apr 16, 2014
2 parents ba017e9 + 4947a72 commit 9b2388c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion paramiko/ssh_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class BadAuthenticationType (AuthenticationException):
def __init__(self, explanation, types):
AuthenticationException.__init__(self, explanation)
self.allowed_types = types

# for unpickling
self.args = (explanation, types, )

def __str__(self):
return SSHException.__str__(self) + ' (allowed_types=%r)' % self.allowed_types

Expand All @@ -73,6 +75,8 @@ class PartialAuthentication (AuthenticationException):
def __init__(self, types):
AuthenticationException.__init__(self, 'partial authentication')
self.allowed_types = types
# for unpickling
self.args = (types, )


class ChannelException (SSHException):
Expand All @@ -86,6 +90,8 @@ class ChannelException (SSHException):
def __init__(self, code, text):
SSHException.__init__(self, text)
self.code = code
# for unpickling
self.args = (code, text, )


class BadHostKeyException (SSHException):
Expand All @@ -103,6 +109,8 @@ def __init__(self, hostname, got_key, expected_key):
self.hostname = hostname
self.key = got_key
self.expected_key = expected_key
# for unpickling
self.args = (hostname, got_key, expected_key, )


class ProxyCommandFailure (SSHException):
Expand All @@ -119,3 +127,5 @@ def __init__(self, command, error):
)
)
self.error = error
# for unpickling
self.args = (command, error, )
4 changes: 4 additions & 0 deletions sites/www/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog
=========

* :bug:`-` Added self.args for exception classes. Used for unpickling. Related
to (`Fabric #986 <https://github.com/fabric/fabric/issues/986>`_, `Fabric
#714 <https://github.com/fabric/fabric/issues/714>`_). Thanks to Alex
Plugaru.
* :bug:`-` Fix logging error in sftp_client for filenames containing the '%'
character. Thanks to Antoine Brenner.
* :bug:`308` Fix regression in dsskey.py that caused sporadic signature
Expand Down

0 comments on commit 9b2388c

Please sign in to comment.