Added logger debug message when file not found when deleting
This commit is contained in:
parent
2983940d0f
commit
511a1551d5
2 changed files with 9 additions and 5 deletions
|
|
@ -108,8 +108,10 @@ class UserHostingKeyForm(forms.ModelForm):
|
|||
raise forms.ValidationError(KEY_ERROR_MESSAGE)
|
||||
try:
|
||||
os.remove(tmp_public_key_file.name)
|
||||
except OSError:
|
||||
pass
|
||||
except FileNotFoundError:
|
||||
logger.debug(
|
||||
"{} could not be deleted because it doesn't exist".format(
|
||||
tmp_public_key_file.name))
|
||||
return openssh_pubkey_str
|
||||
|
||||
def clean_name(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue