Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
921e8dea
Commit
921e8dea
authored
May 16, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return empty list of keys in case of error
parent
cf2826b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
trans/admin_views.py
trans/admin_views.py
+9
-6
No files found.
trans/admin_views.py
View file @
921e8dea
...
...
@@ -163,12 +163,15 @@ def get_host_keys():
'''
Returns list of host keys.
'''
result
=
[]
with
open
(
os
.
path
.
expanduser
(
'~/.ssh/known_hosts'
),
'r'
)
as
handle
:
for
line
in
handle
:
if
' ssh-rsa '
not
in
line
:
continue
result
.
append
(
parse_hosts_line
(
line
))
try
:
result
=
[]
with
open
(
os
.
path
.
expanduser
(
'~/.ssh/known_hosts'
),
'r'
)
as
handle
:
for
line
in
handle
:
if
' ssh-rsa '
not
in
line
:
continue
result
.
append
(
parse_hosts_line
(
line
))
except
IOError
:
return
[]
return
result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment