From 2cf202bd91b293b86b1ef93382fb08e1a4f8f49b Mon Sep 17 00:00:00 2001 From: Javi Melendez Date: Wed, 25 May 2016 10:26:27 +0200 Subject: [PATCH] [FIX] auto_backup: Empty dump using sftp backup option (#432) --- auto_backup/models/db_backup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/auto_backup/models/db_backup.py b/auto_backup/models/db_backup.py index 14f381168e4..d9621f6db12 100644 --- a/auto_backup/models/db_backup.py +++ b/auto_backup/models/db_backup.py @@ -6,7 +6,6 @@ import os import shutil -import tempfile import traceback from contextlib import contextmanager from datetime import datetime, timedelta @@ -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: