首页 > 解决方案 > DeprecationWarning: BaseException 错误导致备份失败

问题描述

我们的服务器和 NAS 上有一个网站,用于每晚进行备份。从 NAS 安排备份,完成后向管理员发送电子邮件。最近备份被破坏并且电子邮件提到存在问题:

--- Start running command BKP  ---
/usr/lib64/python2.7/site-packages/duplicity/util.py:79: **DeprecationWarning: BaseException.message** has been deprecated as of Python 2.6
  m = e.message
BackendException: ssh connection to webserver@*** failed: timed out
03:30:34.391 Task 'BKP' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 03:30:34.391 - Runtime 00:00:30.663 ---

上面的错误行是:

 m = e.message
    if isinstance(m, unicode):
        m = m.encode('utf-8')
    return ufn(m)

请问有谁知道是什么问题?

标签: pythonpython-2.7serverbackupnas

解决方案


推荐阅读