Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions auto_backup/models/db_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import os
import shutil
import tempfile
import traceback
from contextlib import contextmanager
from datetime import datetime, timedelta
Expand Down Expand Up @@ -165,8 +164,7 @@ def action_backup(self):
if backup:
cached = open(backup)
else:
cached = tempfile.TemporaryFile()
db.dump_db(self.env.cr.dbname, cached)
cached = db.dump_db(self.env.cr.dbname, None)

with cached:
for rec in sftp:
Expand Down