Exemple #1
0
 def _add_linux_attr(self, path, st):
     if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
         try:
             attr = get_linux_file_attr(path)
             if(attr != 0):
                 self.linux_attr = attr
         except IOError, e:
             if e.errno == errno.EACCES:
                 add_error('read Linux attr: %s' % e)
             elif e.errno == errno.ENOTTY: # Inappropriate ioctl for device.
                 add_error('read Linux attr: %s' % e)
             else:
                 raise
Exemple #2
0
 def _add_linux_attr(self, path, st):
     if not get_linux_file_attr: return
     if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
         try:
             attr = get_linux_file_attr(path)
             if attr != 0:
                 self.linux_attr = attr
         except OSError, e:
             if e.errno == errno.EACCES:
                 add_error('read Linux attr: %s' % e)
             elif e.errno == errno.ENOTTY:  # Inappropriate ioctl for device.
                 add_error('read Linux attr: %s' % e)
             else:
                 raise
Exemple #3
0
 def _add_linux_attr(self, path, st):
     if not get_linux_file_attr: return
     if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
         try:
             attr = get_linux_file_attr(path)
             if attr != 0:
                 self.linux_attr = attr
         except OSError, e:
             if e.errno == errno.EACCES:
                 add_error('read Linux attr: %s' % e)
             elif e.errno in (errno.ENOTTY, errno.ENOSYS, errno.EOPNOTSUPP):
                 # Assume filesystem doesn't support attrs.
                 return
             else:
                 raise
Exemple #4
0
 def _add_linux_attr(self, path, st):
     if not get_linux_file_attr: return
     if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
         try:
             attr = get_linux_file_attr(path)
             if attr != 0:
                 self.linux_attr = attr
         except OSError, e:
             if e.errno == errno.EACCES:
                 add_error('read Linux attr: %s' % e)
             elif e.errno in (errno.ENOTTY, errno.ENOSYS, errno.EOPNOTSUPP):
                 # Assume filesystem doesn't support attrs.
                 return
             else:
                 raise
Exemple #5
0
 def _add_linux_attr(self, path, st):
     if not get_linux_file_attr: return
     if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
         try:
             attr = get_linux_file_attr(path)
             if attr != 0:
                 self.linux_attr = attr
         except OSError, e:
             if e.errno == errno.EACCES:
                 add_error('read Linux attr: %s' % e)
             elif e.errno == errno.ENOTTY or e.errno == errno.ENOSYS:
                 # ENOTTY: Function not implemented.
                 # ENOSYS: Inappropriate ioctl for device.
                 # Assume filesystem doesn't support attrs.
                 return
             else:
                 raise
Exemple #6
0
 def _add_linux_attr(self, path, st):
     check_linux_file_attr_api()
     if not get_linux_file_attr: return
     if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
         try:
             attr = get_linux_file_attr(path)
             if attr != 0:
                 self.linux_attr = attr
         except OSError as e:
             if e.errno == errno.EACCES:
                 add_error('read Linux attr: %s' % e)
             elif e.errno in (ENOTTY, ENOSYS, EOPNOTSUPP):
                 # Assume filesystem doesn't support attrs.
                 return
             elif e.errno == EINVAL:
                 global _warned_about_attr_einval
                 if not _warned_about_attr_einval:
                     log("Ignoring attr EINVAL;"
                         + " if you're not using ntfs-3g, please report: "
                         + path_msg(path) + '\n')
                     _warned_about_attr_einval = True
                 return
             else:
                 raise
Exemple #7
0
 def _add_linux_attr(self, path, st):
     check_linux_file_attr_api()
     if not get_linux_file_attr: return
     if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
         try:
             attr = get_linux_file_attr(path)
             if attr != 0:
                 self.linux_attr = attr
         except OSError as e:
             if e.errno == errno.EACCES:
                 add_error('read Linux attr: %s' % e)
             elif e.errno in (ENOTTY, ENOSYS, EOPNOTSUPP):
                 # Assume filesystem doesn't support attrs.
                 return
             elif e.errno == EINVAL:
                 global _warned_about_attr_einval
                 if not _warned_about_attr_einval:
                     log("Ignoring attr EINVAL;"
                         + " if you're not using ntfs-3g, please report: "
                         + repr(path) + '\n')
                     _warned_about_attr_einval = True
                 return
             else:
                 raise