浏览代码

use strerror(e.errno) to get verbose error msg

otherwise it is just like: [Errno NN] Exxxxx
Thomas Waldmann 4 年之前
父节点
当前提交
227dccdfdc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/borg/xattr.py

+ 1 - 1
src/borg/xattr.py

@@ -146,6 +146,6 @@ def set_all(path, xattrs, follow_symlinks=False):
                 # generic handler
                 # EACCES: permission denied to set this specific xattr (this may happen related to security.* keys)
                 # EPERM: operation not permitted
-                err_str = str(e)
+                err_str = os.strerror(e.errno)
             logger.warning(msg_format % err_str)
     return warning