python - 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)
请问有谁知道是什么问题?
解决方案
推荐阅读
- r - 如何删除包含另一个数据框中列的元素的行
- reactjs - TypeError: undefined is not an object (评估 'data[imageKey].urls'
- openmp - 在 macOS catalina 2 上运行 openMP 代码时出错
- javascript - 如何从 JSON 中按升序对数据进行排序并将其输出到表中?
- c# - 如何设置没有图标路径的文件夹图标?
- c - 读取路径名时如何使 strtok 工作?
- python - 用另一个数据帧过滤一个数据帧的性能不佳
- r - 无法将颜色设置为 scale_colour_discrete 中的值
- javascript - 我的输入占位符属性替代代码是否可以在例如 IE 中正常工作?
- c++ - 为什么shrink_to_fit(如果请求得到满足)会导致重新分配?