Fix "import *" and resultant new things detectable from "make pyflakes"

This commit is contained in:
Michael DeHaan 2012-03-18 17:16:12 -04:00
parent 33aa50eae7
commit c861e0de55
4 changed files with 26 additions and 21 deletions

View file

@ -20,8 +20,8 @@
import paramiko
import os
from ansible.errors import *
from ansible import errors
################################################
class Connection(object):
@ -68,7 +68,7 @@ class ParamikoConnection(object):
timeout=self.runner.timeout
)
except Exception, e:
raise AnsibleConnectionFailed(str(e))
raise errors.AnsibleConnectionFailed(str(e))
return self
def exec_command(self, cmd):
@ -79,12 +79,12 @@ class ParamikoConnection(object):
def put_file(self, in_path, out_path):
''' transfer a file from local to remote '''
if not os.path.exists(in_path):
raise AnsibleFileNotFound("file or module does not exist: %s" % in_path)
raise errors.AnsibleFileNotFound("file or module does not exist: %s" % in_path)
sftp = self.ssh.open_sftp()
try:
sftp.put(in_path, out_path)
except IOError:
raise AnsibleException("failed to transfer file to %s" % out_path)
raise errors.AnsibleException("failed to transfer file to %s" % out_path)
sftp.close()
def close(self):