summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-03-05 17:12:09 -0800
committerJeff Forcier <jeff@bitprophet.org>2014-03-05 17:12:09 -0800
commit7e8623f06f1966e67dfa02f26e62cada632bc600 (patch)
tree30229a02071862b59f8efb5ff30b9f314538110f
parentb2be63ec623b5944f9b84cac8b8f41aeb2b42fb7 (diff)
Fix a bunch of indentation errors.
Maybe that whitespace merge flag was not so great an idea.
-rw-r--r--paramiko/client.py2
-rw-r--r--paramiko/file.py24
-rw-r--r--paramiko/message.py2
-rw-r--r--paramiko/pkey.py4
-rw-r--r--paramiko/primes.py16
-rw-r--r--paramiko/sftp_client.py8
-rw-r--r--paramiko/util.py2
7 files changed, 29 insertions, 29 deletions
diff --git a/paramiko/client.py b/paramiko/client.py
index 2bb7c4bc..9471b06e 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -135,7 +135,7 @@ class SSHClient (object):
with open(filename, 'w') as f:
for hostname, keys in self._host_keys.items():
for keytype, key in keys.items():
- f.write('%s %s %s\n' % (hostname, keytype, key.get_base64()))
+ f.write('%s %s %s\n' % (hostname, keytype, key.get_base64()))
def get_host_keys(self):
"""
diff --git a/paramiko/file.py b/paramiko/file.py
index 9f002423..69b730e2 100644
--- a/paramiko/file.py
+++ b/paramiko/file.py
@@ -86,20 +86,20 @@ class BufferedFile (object):
return
if PY2:
- def next(self):
- """
- Returns the next line from the input, or raises
- `~exceptions.StopIteration` when EOF is hit. Unlike Python file
- objects, it's okay to mix calls to `next` and `readline`.
+ def next(self):
+ """
+ Returns the next line from the input, or raises
+ `~exceptions.StopIteration` when EOF is hit. Unlike Python file
+ objects, it's okay to mix calls to `next` and `readline`.
- :raises StopIteration: when the end of the file is reached.
+ :raises StopIteration: when the end of the file is reached.
- :return: a line (`str`) read from the file.
- """
- line = self.readline()
- if not line:
- raise StopIteration
- return line
+ :return: a line (`str`) read from the file.
+ """
+ line = self.readline()
+ if not line:
+ raise StopIteration
+ return line
else:
def __next__(self):
"""
diff --git a/paramiko/message.py b/paramiko/message.py
index a487f2e8..a6cc7a28 100644
--- a/paramiko/message.py
+++ b/paramiko/message.py
@@ -257,7 +257,7 @@ class Message (object):
self.packet.write(max_byte)
self.add_string(util.deflate_long(n))
else:
- self.packet.write(struct.pack('>I', n))
+ self.packet.write(struct.pack('>I', n))
return self
def add_int64(self, n):
diff --git a/paramiko/pkey.py b/paramiko/pkey.py
index 31b4e7c1..04d61e95 100644
--- a/paramiko/pkey.py
+++ b/paramiko/pkey.py
@@ -253,8 +253,8 @@ class PKey (object):
:raises SSHException: if the key file is invalid.
"""
with open(filename, 'r') as f:
- data = self._read_private_key(tag, f, password)
- return data
+ data = self._read_private_key(tag, f, password)
+ return data
def _read_private_key(self, tag, f, password=None):
lines = f.readlines()
diff --git a/paramiko/primes.py b/paramiko/primes.py
index 34b9877e..bf1a6c62 100644
--- a/paramiko/primes.py
+++ b/paramiko/primes.py
@@ -114,14 +114,14 @@ class ModulusPack (object):
"""
self.pack = {}
with open(filename, 'r') as f:
- for line in f:
- line = line.strip()
- if (len(line) == 0) or (line[0] == '#'):
- continue
- try:
- self._parse_modulus(line)
- except:
- continue
+ for line in f:
+ line = line.strip()
+ if (len(line) == 0) or (line[0] == '#'):
+ continue
+ try:
+ self._parse_modulus(line)
+ except:
+ continue
def get_modulus(self, min, prefer, max):
bitsizes = sorted(self.pack.keys())
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index 90571234..67558986 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -526,8 +526,8 @@ class SFTPClient(BaseSFTP):
Began returning rich attribute objects.
"""
with self.file(remotepath, 'wb') as fr:
- fr.set_pipelined(True)
- size = 0
+ fr.set_pipelined(True)
+ size = 0
while True:
data = fl.read(32768)
fr.write(data)
@@ -593,8 +593,8 @@ class SFTPClient(BaseSFTP):
Added the ``callable`` param.
"""
with self.open(remotepath, 'rb') as fr:
- file_size = self.stat(remotepath).st_size
- fr.prefetch()
+ file_size = self.stat(remotepath).st_size
+ fr.prefetch()
size = 0
while True:
data = fr.read(32768)
diff --git a/paramiko/util.py b/paramiko/util.py
index c4b87e3b..11160cfe 100644
--- a/paramiko/util.py
+++ b/paramiko/util.py
@@ -131,7 +131,7 @@ def bit_length(n):
try:
return n.bitlength()
except AttributeError:
- norm = deflate_long(n, 0)
+ norm = deflate_long(n, 0)
hbyte = byte_ord(norm[0])
if hbyte == 0:
return 1