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
0713dccf
Commit
0713dccf
authored
Sep 26, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean environment for ssh key management
Issue #528 Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
4b6bbd66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
weblate/trans/admin_views.py
weblate/trans/admin_views.py
+4
-1
No files found.
weblate/trans/admin_views.py
View file @
0713dccf
...
@@ -29,7 +29,7 @@ from weblate import settings_example
...
@@ -29,7 +29,7 @@ from weblate import settings_example
from
weblate
import
appsettings
from
weblate
import
appsettings
from
weblate.accounts.avatar
import
HAS_LIBRAVATAR
from
weblate.accounts.avatar
import
HAS_LIBRAVATAR
from
weblate.accounts.forms
import
HAS_ICU
from
weblate.accounts.forms
import
HAS_ICU
from
weblate.trans.util
import
get_configuration_errors
from
weblate.trans.util
import
get_configuration_errors
,
get_clean_env
import
weblate
import
weblate
import
django
import
django
...
@@ -261,6 +261,7 @@ def generate_ssh_key(request):
...
@@ -261,6 +261,7 @@ def generate_ssh_key(request):
'-f'
,
RSA_KEY_FILE
[:
-
4
]
'-f'
,
RSA_KEY_FILE
[:
-
4
]
],
],
stderr
=
subprocess
.
STDOUT
,
stderr
=
subprocess
.
STDOUT
,
env
=
get_clean_env
(),
)
)
messages
.
success
(
request
,
_
(
'Created new SSH key.'
))
messages
.
success
(
request
,
_
(
'Created new SSH key.'
))
except
(
subprocess
.
CalledProcessError
,
OSError
)
as
exc
:
except
(
subprocess
.
CalledProcessError
,
OSError
)
as
exc
:
...
@@ -288,6 +289,7 @@ def add_host_key(request):
...
@@ -288,6 +289,7 @@ def add_host_key(request):
output
=
subprocess
.
check_output
(
output
=
subprocess
.
check_output
(
cmdline
,
cmdline
,
stderr
=
subprocess
.
STDOUT
,
stderr
=
subprocess
.
STDOUT
,
env
=
get_clean_env
(),
)
)
keys
=
[
keys
=
[
line
line
...
@@ -329,6 +331,7 @@ def ssh(request):
...
@@ -329,6 +331,7 @@ def ssh(request):
[
'which'
,
'ssh-keygen'
],
[
'which'
,
'ssh-keygen'
],
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
stderr
=
subprocess
.
STDOUT
,
env
=
get_clean_env
(),
)
)
can_generate
=
(
ret
==
0
and
not
os
.
path
.
exists
(
RSA_KEY_FILE
))
can_generate
=
(
ret
==
0
and
not
os
.
path
.
exists
(
RSA_KEY_FILE
))
except
subprocess
.
CalledProcessError
:
except
subprocess
.
CalledProcessError
:
...
...
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