Browse Source

[FIX] auto_backup: bad reference to field sftp_private_key (#423)

Bump module version to 8.0.1.0.1
pull/1384/head
Javi Melendez 9 years ago
committed by Aitor Bouzas
parent
commit
88ee9fca2b
  1. 2
      auto_backup/__openerp__.py
  2. 6
      auto_backup/models/db_backup.py

2
auto_backup/__openerp__.py

@ -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,"

6
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 @@ class DbBackup(models.Model):
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:
@ -274,7 +272,7 @@ class DbBackup(models.Model):
"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:

Loading…
Cancel
Save