Removed unwanted code
This commit is contained in:
parent
3770489a49
commit
2983940d0f
1 changed files with 2 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import os
|
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.auth import authenticate
|
from django.contrib.auth import authenticate
|
||||||
|
@ -104,8 +104,7 @@ class UserHostingKeyForm(forms.ModelForm):
|
||||||
['ssh-keygen', '-lf', tmp_public_key_file.name])
|
['ssh-keygen', '-lf', tmp_public_key_file.name])
|
||||||
except subprocess.CalledProcessError as cpe:
|
except subprocess.CalledProcessError as cpe:
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"Not a correct ssh format {error} {out}".format(
|
"Not a correct ssh format {error}".format(error=str(cpe)))
|
||||||
error=str(cpe), out=out))
|
|
||||||
raise forms.ValidationError(KEY_ERROR_MESSAGE)
|
raise forms.ValidationError(KEY_ERROR_MESSAGE)
|
||||||
try:
|
try:
|
||||||
os.remove(tmp_public_key_file.name)
|
os.remove(tmp_public_key_file.name)
|
||||||
|
|
Loading…
Reference in a new issue