summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/pkey.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/pkey.py b/paramiko/pkey.py
index c8f84e0a..db5b77ac 100644
--- a/paramiko/pkey.py
+++ b/paramiko/pkey.py
@@ -274,7 +274,7 @@ class PKey (object):
start += 1
# find end
end = start
- while (lines[end].strip() != '-----END ' + tag + ' PRIVATE KEY-----') and (end < len(lines)):
+ while end < len(lines) and lines[end].strip() != '-----END ' + tag + ' PRIVATE KEY-----':
end += 1
# if we trudged to the end of the file, just try to cope.
try: