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