Skip to content

Commit

Permalink
[FIX] auto_backup: Empty dump using sftp backup option (OCA#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
jabibi authored and sebalix committed Jan 23, 2017
1 parent 9bd2dc9 commit 2cf202b
Showing 1 changed file with 1 addition and 3 deletions.
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

0 comments on commit 2cf202b

Please sign in to comment.