From d5a275dbbedbf73510fdcc9d98657c5dcc00dcc7 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 25 Sep 2016 16:33:02 +0200 Subject: [PATCH] Log directory path for exceptions Improve the log message of setup_file_sftp_userdir to include the path that has been attempted to create. --- gvafile/fileservertasks/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gvafile/fileservertasks/tasks.py b/gvafile/fileservertasks/tasks.py index 2c02c4a..432163f 100644 --- a/gvafile/fileservertasks/tasks.py +++ b/gvafile/fileservertasks/tasks.py @@ -100,7 +100,8 @@ def setup_file_sftp_userdir(username, *args, **kwargs): sftp_directory], stderr=subprocess.STDOUT) except subprocess.CalledProcessError as cpe: 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( 'created sftp directory %s for user %s', sftp_directory, username) return {'username': username, 'sftp_directory': sftp_directory}