Skip to content

Commit

Permalink
[FIX] auto_backup: TypeError: makedirs() got an unexpected keyword ar…
Browse files Browse the repository at this point in the history
…gument 'exist_ok'
  • Loading branch information
eLBati committed Apr 12, 2024
1 parent 95061c4 commit b73860c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auto_backup/models/db_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def action_backup(self):
with rec.sftp_connection() as remote:
# Directory must exist
try:
remote.makedirs(rec.folder, exist_ok=True)
remote.makedirs(rec.folder)
except pysftp.ConnectionException as exc:
_logger.exception(
"pysftp ConnectionException: %s" % exc
Expand Down
2 changes: 1 addition & 1 deletion auto_backup/tests/test_db_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_action_backup_sftp_mkdirs(self):
with self.patch_filtered_sftp(rec_id):
conn = rec_id.sftp_connection().__enter__()
rec_id.action_backup()
conn.makedirs.assert_called_once_with(rec_id.folder, exist_ok=True)
conn.makedirs.assert_called_once_with(rec_id.folder)

def test_action_backup_sftp_cleanup(self):
""" Backup sftp database and cleanup old databases """
Expand Down

0 comments on commit b73860c

Please sign in to comment.