From 924b17c4135bd9cddfec111cd6c1b86787e67d3e Mon Sep 17 00:00:00 2001 From: Daniel Blanco Date: Tue, 15 Mar 2016 18:30:18 -0300 Subject: [PATCH 1/2] [FIX] Avoid to stop the system using raise --- auto_backup/backup_scheduler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auto_backup/backup_scheduler.py b/auto_backup/backup_scheduler.py index 5210ecf..93c40bc 100644 --- a/auto_backup/backup_scheduler.py +++ b/auto_backup/backup_scheduler.py @@ -27,10 +27,12 @@ import datetime import base64 import re + try: import pysftp except ImportError: - raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)') + pass + from openerp.osv import fields,osv,orm from openerp import tools from openerp import netsvc From 5b518fcce4209918744ecc4b38b7c2b6595b9fcb Mon Sep 17 00:00:00 2001 From: Daniel Blanco Date: Tue, 15 Mar 2016 18:38:48 -0300 Subject: [PATCH 2/2] [FIX] Declare external deps in manifest --- auto_backup/__openerp__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auto_backup/__openerp__.py b/auto_backup/__openerp__.py index 54daed2..a431528 100644 --- a/auto_backup/__openerp__.py +++ b/auto_backup/__openerp__.py @@ -41,6 +41,9 @@ 4) If you want to write backups to a remote location you should fill in the SFTP details. """, "depends" : ['base'], + "external_dependencies": { + 'python': ['pysftp'] + }, "init_xml" : [], "demo_xml" : [], "update_xml" : ["bkp_conf_view.xml","backup_data.xml"],