diff options
author | Jeremy T. Bouse <jbouse@debian.org> | 2014-02-14 21:29:58 -0500 |
---|---|---|
committer | Jeremy T. Bouse <jbouse@debian.org> | 2014-02-14 21:29:58 -0500 |
commit | 3bb46c9cb414ca82afab715d2d0cc00ed71cfb6d (patch) | |
tree | 968464cb0214980291af70f9d1756d907b35aa6c /demos | |
parent | 1a716ed46d1d556d4ba6798608ab498320acd886 (diff) | |
download | python-paramiko-3bb46c9cb414ca82afab715d2d0cc00ed71cfb6d.tar python-paramiko-3bb46c9cb414ca82afab715d2d0cc00ed71cfb6d.tar.gz |
Imported Upstream version 1.12.2upstream/1.12.2
Diffstat (limited to 'demos')
-rwxr-xr-x | demos/demo.py | 3 | ||||
-rwxr-xr-x | demos/demo_keygen.py | 2 | ||||
-rw-r--r-- | demos/demo_server.py | 2 | ||||
-rwxr-xr-x | demos/demo_sftp.py | 2 | ||||
-rwxr-xr-x | demos/demo_simple.py | 4 | ||||
-rw-r--r-- | demos/forward.py | 6 | ||||
-rw-r--r-- | demos/interactive.py | 2 | ||||
-rwxr-xr-x | demos/rforward.py | 2 |
8 files changed, 12 insertions, 11 deletions
diff --git a/demos/demo.py b/demos/demo.py index 05524d3..aa4bdaa 100755 --- a/demos/demo.py +++ b/demos/demo.py @@ -9,7 +9,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. @@ -26,7 +26,6 @@ import os import select import socket import sys -import threading import time import traceback diff --git a/demos/demo_keygen.py b/demos/demo_keygen.py index b4ce5b8..bdd7388 100755 --- a/demos/demo_keygen.py +++ b/demos/demo_keygen.py @@ -9,7 +9,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. diff --git a/demos/demo_server.py b/demos/demo_server.py index 4972928..915b0c6 100644 --- a/demos/demo_server.py +++ b/demos/demo_server.py @@ -9,7 +9,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. diff --git a/demos/demo_sftp.py b/demos/demo_sftp.py index 992615f..7c4aaba 100755 --- a/demos/demo_sftp.py +++ b/demos/demo_sftp.py @@ -9,7 +9,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. diff --git a/demos/demo_simple.py b/demos/demo_simple.py index 231da8d..50f344a 100755 --- a/demos/demo_simple.py +++ b/demos/demo_simple.py @@ -9,7 +9,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. @@ -63,7 +63,7 @@ password = getpass.getpass('Password for %s@%s: ' % (username, hostname)) try: client = paramiko.SSHClient() client.load_system_host_keys() - client.set_missing_host_key_policy(paramiko.WarningPolicy) + client.set_missing_host_key_policy(paramiko.WarningPolicy()) print '*** Connecting...' client.connect(hostname, port, username, password) chan = client.invoke_shell() diff --git a/demos/forward.py b/demos/forward.py index 4e10785..5048c77 100644 --- a/demos/forward.py +++ b/demos/forward.py @@ -9,7 +9,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. @@ -78,9 +78,11 @@ class Handler (SocketServer.BaseRequestHandler): if len(data) == 0: break self.request.send(data) + + peername = self.request.getpeername() chan.close() self.request.close() - verbose('Tunnel closed from %r' % (self.request.getpeername(),)) + verbose('Tunnel closed from %r' % (peername,)) def forward_tunnel(local_port, remote_host, remote_port, transport): diff --git a/demos/interactive.py b/demos/interactive.py index 4cbc617..f3be74d 100644 --- a/demos/interactive.py +++ b/demos/interactive.py @@ -7,7 +7,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. diff --git a/demos/rforward.py b/demos/rforward.py index ef4c532..4a5d2e4 100755 --- a/demos/rforward.py +++ b/demos/rforward.py @@ -9,7 +9,7 @@ # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # -# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. |