In _add_linux_attr(), when calling get_linux_file_attr(), catch
IOError, not EnvironmentError and handle ENOTTY (call add_error()).
ENOTTY can indicate that the underlying ioctl (FS_IOC_GETFLAGS) is
inappropriate.
attr = get_linux_file_attr(path)
if(attr != 0):
self.linux_attr = get_linux_file_attr(path)
- except EnvironmentError, e:
+ 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