소스 검색

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

otherwise it is just like: [Errno NN] Exxxxx
Thomas Waldmann 5 년 전
부모
커밋
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