diff --git a/gvafile/osusers/tasks.py b/gvafile/osusers/tasks.py index 49b5a6c..34b09e4 100644 --- a/gvafile/osusers/tasks.py +++ b/gvafile/osusers/tasks.py @@ -44,8 +44,7 @@ def setup_file_sftp_userdir(username): The task is rejected if the directory creation fails. :param str username: the user name - :raises celery.exceptions.Reject: if the SFTP directory of the user cannot - be created + :raises Exception: if the SFTP directory of the user cannot be created :return: the created directory name :rtype: str @@ -58,12 +57,11 @@ def setup_file_sftp_userdir(username): subprocess.check_output([ 'sudo' 'setfacl', '-r', '-m', 'www-data:--x', sftp_directory], stderr=subprocess.STDOUT) - except subprocess.CalledProcessError as exc: + except subprocess.CalledProcessError: _logger.exception( - 'could not create SFTP directory for user %s: %s', - username, exc.output - ) - raise Reject(exc, requeue=False) + 'could not create SFTP directory for user %s', username) + raise Exception( + "could not create SFTP directory for user %s" % username) return sftp_directory