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:
|
||||
rm -rf build dist
|
||||
rm -f MANIFEST *.log
|
||||
rm -f MANIFEST *.log demos/*.log
|
||||
|
||||
# places where the version number is stored:
|
||||
#
|
||||
|
|
2
README
2
README
|
@ -257,4 +257,6 @@ v1.0 JIGGLYPUFF
|
|||
* SFTPClient.set_size
|
||||
* remove @since that predate 1.0
|
||||
* 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.connect(os.environ['SSH_AUTH_SOCK'])
|
||||
self.conn = conn
|
||||
type, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES))
|
||||
if type != SSH2_AGENT_IDENTITIES_ANSWER:
|
||||
ptype, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES))
|
||||
if ptype != SSH2_AGENT_IDENTITIES_ANSWER:
|
||||
raise SSHException('could not get keys from ssh-agent')
|
||||
keys = []
|
||||
for i in range(result.get_int()):
|
||||
|
@ -132,7 +132,7 @@ class AgentKey(PKey):
|
|||
msg.add_string(self.blob)
|
||||
msg.add_string(data)
|
||||
msg.add_int(0)
|
||||
type, result = self.agent._send_message(msg)
|
||||
if type != SSH2_AGENT_SIGN_RESPONSE:
|
||||
ptype, result = self.agent._send_message(msg)
|
||||
if ptype != SSH2_AGENT_SIGN_RESPONSE:
|
||||
raise SSHException('key cannot be used for signing')
|
||||
return result.get_string()
|
||||
|
|
|
@ -45,6 +45,8 @@ class AuthHandler (object):
|
|||
self.auth_method = ''
|
||||
self.password = None
|
||||
self.private_key = None
|
||||
self.interactive_handler = None
|
||||
self.submethods = None
|
||||
# for server mode:
|
||||
self.auth_username = None
|
||||
self.auth_fail_count = 0
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
L{SFTPFile}
|
||||
"""
|
||||
|
||||
import socket
|
||||
import threading
|
||||
from paramiko.common import *
|
||||
from paramiko.sftp import *
|
||||
|
@ -76,7 +77,7 @@ class SFTPFile (BufferedFile):
|
|||
except EOFError:
|
||||
# may have outlived the Transport connection
|
||||
pass
|
||||
except IOError:
|
||||
except (IOError, socket.error):
|
||||
# may have outlived the Transport connection
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue