fixed missing colon in if statement
This commit is contained in:
parent
72b551f6b0
commit
0b35036df6
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ class InsecureSSHKeyUsername(Exception):
|
||||||
return '%s: %s' % (self.__doc__, ': '.join(self.args))
|
return '%s: %s' % (self.__doc__, ': '.join(self.args))
|
||||||
|
|
||||||
def ssh_extract_user(pubkey):
|
def ssh_extract_user(pubkey):
|
||||||
if re.search(r"\s", pubkey)
|
if re.search(r"\s", pubkey):
|
||||||
_, user = pubkey.rsplit(None, 1)
|
_, user = pubkey.rsplit(None, 1)
|
||||||
else:
|
else:
|
||||||
user = pubkey
|
user = pubkey
|
||||||
|
@ -134,7 +134,7 @@ class Main(app.App):
|
||||||
log.info('Reading SSH public key...')
|
log.info('Reading SSH public key...')
|
||||||
pubkey = read_ssh_pubkey()
|
pubkey = read_ssh_pubkey()
|
||||||
user = ssh_extract_user(pubkey)
|
user = ssh_extract_user(pubkey)
|
||||||
if not re.search(r"\s", pubkey)
|
if not re.search(r"\s", pubkey):
|
||||||
pubkey = None
|
pubkey = None
|
||||||
if user is None:
|
if user is None:
|
||||||
log.error('Cannot parse user from SSH public key.')
|
log.error('Cannot parse user from SSH public key.')
|
||||||
|
|
Loading…
Reference in a new issue