Log directory path for exceptions
Improve the log message of setup_file_sftp_userdir to include the path that has been attempted to create.
This commit is contained in:
parent
4eb3a1c3f3
commit
d5a275dbbe
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ def setup_file_sftp_userdir(username, *args, **kwargs):
|
||||||
sftp_directory], stderr=subprocess.STDOUT)
|
sftp_directory], stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError as cpe:
|
except subprocess.CalledProcessError as cpe:
|
||||||
log_and_raise(
|
log_and_raise(
|
||||||
cpe, 'could not create SFTP directory for user %s', username)
|
cpe, 'could not create SFTP directory %s for user %s',
|
||||||
|
sftp_directory, username)
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
'created sftp directory %s for user %s', sftp_directory, username)
|
'created sftp directory %s for user %s', sftp_directory, username)
|
||||||
return {'username': username, 'sftp_directory': sftp_directory}
|
return {'username': username, 'sftp_directory': sftp_directory}
|
||||||
|
|
Loading…
Reference in a new issue