Skip to content

Commit

Permalink
[FIX] auto_backup: bad reference to field sftp_private_key (OCA#423)
Browse files Browse the repository at this point in the history
Bump module version to 8.0.1.0.1
  • Loading branch information
jabibi authored and mtelahun committed Sep 5, 2022
1 parent 2a257d6 commit 50b8842
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion auto_backup/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"name": "Database Auto-Backup",
"summary": "Backups database",
"version": "8.0.1.0.0",
"version": "8.0.1.0.1",
"author": (
"VanRoey.be - Yenthe Van Ginneken, Agile Business Group,"
" Grupo ESOC Ingenier??a de Servicios,"
Expand Down
6 changes: 2 additions & 4 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 Expand Up @@ -274,7 +272,7 @@ def sftp_connection(self):
"Trying to connect to sftp://%(username)s@%(host)s:%(port)d",
extra=params)
if self.sftp_private_key:
params["private_key"] = self.stfpprivatekey
params["private_key"] = self.sftp_private_key
if self.sftp_password:
params["private_key_pass"] = self.sftp_password
else:
Expand Down

0 comments on commit 50b8842

Please sign in to comment.