pep8 and pylint fixes

This commit is contained in:
Scott Moser
2013-03-07 14:54:25 -05:00
parent 6615becaab
commit 0753ef964a
11 changed files with 37 additions and 31 deletions

View File

@@ -19,9 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from StringIO import StringIO
import csv
import os
import pwd
@@ -42,6 +39,7 @@ VALID_KEY_TYPES = ("rsa", "dsa", "ssh-rsa", "ssh-dss", "ecdsa",
"ecdsa-sha2-nistp384-cert-v01@openssh.com",
"ecdsa-sha2-nistp521-cert-v01@openssh.com")
class AuthKeyLine(object):
def __init__(self, source, keytype=None, base64=None,
comment=None, options=None):
@@ -141,14 +139,14 @@ class AuthKeyLineParser(object):
ent = line.strip()
try:
(keytype, base64, comment) = parse_ssh_key(ent)
except TypeError as e:
except TypeError:
(keyopts, remain) = self._extract_options(ent)
if options is None:
options = keyopts
try:
(keytype, base64, comment) = parse_ssh_key(remain)
except TypeError as e:
except TypeError:
return AuthKeyLine(src_line)
return AuthKeyLine(src_line, keytype=keytype, base64=base64,