Преглед изворни кода

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

otherwise it is just like: [Errno NN] Exxxxx
Thomas Waldmann пре 4 година
родитељ
комит
6916d1b3bc
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/borg/archive.py

+ 1 - 1
src/borg/archive.py

@@ -784,7 +784,7 @@ Utilization of max. archive size: {csize_max:.0%}
                     # generic handler
                     # generic handler
                     # EACCES: permission denied to set this specific xattr (this may happen related to security.* keys)
                     # EACCES: permission denied to set this specific xattr (this may happen related to security.* keys)
                     # EPERM: operation not permitted
                     # EPERM: operation not permitted
-                    err_str = str(e)
+                    err_str = os.strerror(e.errno)
                 logger.warning(msg_format % err_str)
                 logger.warning(msg_format % err_str)
                 set_ec(EXIT_WARNING)
                 set_ec(EXIT_WARNING)
         # bsdflags include the immutable flag and need to be set last:
         # bsdflags include the immutable flag and need to be set last: