a few more pychecker warning fixups
This commit is contained in:
parent
1a469d97fd
commit
cf0c5c7720
2
Makefile
2
Makefile
|
@ -27,7 +27,7 @@ always:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build dist
|
rm -rf build dist
|
||||||
rm -f MANIFEST *.log
|
rm -f MANIFEST *.log demos/*.log
|
||||||
|
|
||||||
# places where the version number is stored:
|
# places where the version number is stored:
|
||||||
#
|
#
|
||||||
|
|
2
README
2
README
|
@ -257,4 +257,6 @@ v1.0 JIGGLYPUFF
|
||||||
* SFTPClient.set_size
|
* SFTPClient.set_size
|
||||||
* remove @since that predate 1.0
|
* remove @since that predate 1.0
|
||||||
* put examples in examples/ folder
|
* put examples in examples/ folder
|
||||||
|
* support .ssh/known_hosts files made with HashKnownHosts
|
||||||
|
* sftp server mode should convert all paths to unicode before calling into sftp_si
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,8 @@ class Agent:
|
||||||
conn = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
conn = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||||
conn.connect(os.environ['SSH_AUTH_SOCK'])
|
conn.connect(os.environ['SSH_AUTH_SOCK'])
|
||||||
self.conn = conn
|
self.conn = conn
|
||||||
type, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES))
|
ptype, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES))
|
||||||
if type != SSH2_AGENT_IDENTITIES_ANSWER:
|
if ptype != SSH2_AGENT_IDENTITIES_ANSWER:
|
||||||
raise SSHException('could not get keys from ssh-agent')
|
raise SSHException('could not get keys from ssh-agent')
|
||||||
keys = []
|
keys = []
|
||||||
for i in range(result.get_int()):
|
for i in range(result.get_int()):
|
||||||
|
@ -132,7 +132,7 @@ class AgentKey(PKey):
|
||||||
msg.add_string(self.blob)
|
msg.add_string(self.blob)
|
||||||
msg.add_string(data)
|
msg.add_string(data)
|
||||||
msg.add_int(0)
|
msg.add_int(0)
|
||||||
type, result = self.agent._send_message(msg)
|
ptype, result = self.agent._send_message(msg)
|
||||||
if type != SSH2_AGENT_SIGN_RESPONSE:
|
if ptype != SSH2_AGENT_SIGN_RESPONSE:
|
||||||
raise SSHException('key cannot be used for signing')
|
raise SSHException('key cannot be used for signing')
|
||||||
return result.get_string()
|
return result.get_string()
|
||||||
|
|
|
@ -45,6 +45,8 @@ class AuthHandler (object):
|
||||||
self.auth_method = ''
|
self.auth_method = ''
|
||||||
self.password = None
|
self.password = None
|
||||||
self.private_key = None
|
self.private_key = None
|
||||||
|
self.interactive_handler = None
|
||||||
|
self.submethods = None
|
||||||
# for server mode:
|
# for server mode:
|
||||||
self.auth_username = None
|
self.auth_username = None
|
||||||
self.auth_fail_count = 0
|
self.auth_fail_count = 0
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
L{SFTPFile}
|
L{SFTPFile}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import socket
|
||||||
import threading
|
import threading
|
||||||
from paramiko.common import *
|
from paramiko.common import *
|
||||||
from paramiko.sftp import *
|
from paramiko.sftp import *
|
||||||
|
@ -76,7 +77,7 @@ class SFTPFile (BufferedFile):
|
||||||
except EOFError:
|
except EOFError:
|
||||||
# may have outlived the Transport connection
|
# may have outlived the Transport connection
|
||||||
pass
|
pass
|
||||||
except IOError:
|
except (IOError, socket.error):
|
||||||
# may have outlived the Transport connection
|
# may have outlived the Transport connection
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue